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

Which step in a scientific method entails gathering information to identify variables that might help with the experiment a. conclusion b. hypothesis c. observa
where are gummy bears made?
Which of the following are true of Paris? Select all that apply. He survived an early attempt on his life. He was raised by a servant and became a shepherd. He
What is 8/33 as a decimal?
The structures that an animal uses to exchange gases with its surroundings make up the
what is the reciprocal of 2 7/10
Draw 10 coins to show an amount between 50cent and $1.00
The grocery store sells a 25-ounce container of lemonade mix for $2.00. The wholesale club sells a 75 ounce container of the same lemonade mix for $6.75. a) Fin
how would you best describe a hypothesis
what happened 100 years ago in jrotc