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

what is the importance of saving a web page
Briefly explain about the infrastructure of development.​
What was the main difference between the economic policies of Truman and Eisenhower?​
could be developed to attack cancer cells ​
¿A qué hora vas de compras? (5:00 p.m.)
Amoebae move and engulf food by using pseudopodia, which is Latin for ___ ____ (two words)
which value is a solution for the inequality 9 _> 1/2 x?helpppp pls
Please help as soon as possible
60 x 4 sqaure is what
9,000 were divided equally among a certain no of persons . had there been 20 more person each would have got rupees 160 . find the original no of persons​