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

a good speaker can make a speech without preparing for it true or false​
A microwave is placed on top of two boxes. One box is 4 feet 7 inches tall the other box is 4 feet 9 inches tall and the microwave is 2 feet 11 inches tall. how
A famous victory over the Mongols took place when people living in the present day region of ____________ gathered in Grobnik field, fighting off tens of thous
I NEED HELP ASAP! PLSSSSSSSSSSSSSSSSSSS
What is that answer to this question?
what is most challenging for developing countries?
Segments of DNA that contain the code for specific proteins are called _____. nucleotides chromosomes genes RNA
N-(m+n); use m=2, and n=-3
Tyrone is considering a purchase of a $145,000 home at 5.75%. Under this rate, his mortgage payment would be $846.18. If he purchases a point, his new mortgage
Isaiah has $3.45 in dimes and quarters. If he has a total of 24 coins, how many dimes does he have?