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

5.71 as a whole number
What's an example of 2 equivalent equations
Harry was 120 cm tall. He's little brother is 1/3 of his height. How tall was harry's brother? ?
A microscopic view of mildew fungus displays thin, threadlike filaments, which take nutrients from the host cell. What are these filaments called?
In what way did the United Kingdom, France, and the Soviet Union deal with Germany similarly in the years before World War II? A. They tried to avoid war with G
Barely did these in class...
What was the purpose of mummification? preserving the body for the afterlife preventing decomposition preserving the soul for the afterlife purifying the soul
So! What is 19% of 800? :)
what is the defintion of memoir
Mrs. McGlashan is making paint for her class. She needs 3/4 cups of warm water for each batch. Part A. Mrs. McGlashan has a 1 cup measure that has no markings