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

4 3/8 +6 1/8 divided by 1/4
Which sentence contains the central claim in compulsory voting an idea whose time has come by tor hunter
What is unique about conjugating the verbs “tener” and “hacer”?(Answer in English)
The Battle of Balaclava is a famous battle in which war?
A worm moves 3/8 inches five minutes for one hour and 25 minutes how far does a worm moving this time explain
doris tiene en su cartera billetes de $10 y de $20.si en total tienen 25 billetes y $330 ¿cuantos billetes tiene cada uno?
help me pleaseeeeeee !!!!!!!!!
A mihrab is an important part of the mosque. What is its function? A. to call the faithful to prayer B. to keep a watch on the town C. to indicate the direct
Which statement about sternberg’s triangular theory of love is most accurate? A)There are five types of love that can be described from the three components of
Solve the Quadratic Equation. x^2 = -4 Don't know where to start, would appreciate if someone would be able to explain the answer in detail!