andreepviviano andreepviviano
  • 04-03-2017
  • Computers and Technology
contestada

Write an algorithm in pseudocode or english that would describe how to use a stack to reverse any list.

Respuesta :

padawan
padawan padawan
  • 04-03-2017
int data[n];
int rev[n];

for (i=0; i < n; i++)
     stack.push(data[n]);
for (i=0; i <n; i++)
     rev[i] = stack.pop();

Answer Link

Otras preguntas

Rae comes from Canada, and he speaks French and English. Is the comma needed for this sentence to be correct?
Which is the primary lunar phase that takes place one week after the first quarter.
PLEASE PLEASE HELP!!!! WILL GIVE BRAINLIEST!Which system of inequalities is represented by the graph? ​
An environmental group conducted a study to determine whether crows in a certain region were ingesting food containing unhealthy levels of lead. A biologist cla
I have two bases that are not rectangular I have 6 vertices. I have 9 edges.what am Isorry for asking a lot I'm not that smart in math ​
Increase 12 in to the given ratio of 4:3​
The article discusses discrimination directed towards children with disabilities. What are some steps parents can take to help combat discrimination?.
Someone who takes charge and solves problems without being asked to is demonstrating ______.
Eating fast food is not bad if you only eat it once a week.
The projectile height is maximum for which launch angle ?​