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

During the mid-1930s,president Roosevelt realized that most Americans
if u help me ur will be lucky for the rest of your life​
What physical feature separates India from the continent of Asia? PLEASE HELP
Craig tossed a coin 16 times. The coin landed on heads 6 times. How does the number of heads Craig obtained compare with the number of heads expected?
Describe the location of point (-2,6,7) in three dimensional coordinate space
What do non nonvascular plants lack?​
Solve for x and y. Geometry
There were possibly a few track men out there who knew the race horse as well as Edna, but there was certainly none who knew it better. She sat between her two
There are 9 students in a class: 7 boys and 2 girls.If the teacher picks a group of 3 at random, what is the probability that everyone in the group is a boy?​
What is the current scientific thinking about the information of the solar system?