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

IF YOU HAVE READ OR WATCHED THE CHRISTMAS CAROL PLEASE ANSWER. Scene 2 1. Who appears to Scrooge? What is required of the visitor? 2. Why is the visitor there?
Can all molecules diffuse through all cell membranes
How do you change Newtons into kilograms
Im trying to draw a minutaur/eagle is this good enough.
will enyone help me answer this question please
what is 66 2/3% in decimal form
What is 160 to a mixed number
The part of the brain responsible for voluntary, or conscious, body activities and emotions is located in the Frontal Lobe or Cerebrum o.O
Meiosis is different from the process shown because, during meiosis, A) chromosomes are not replicated. B) two gametes are made for every original cell. C) four
Show your work please john wants to know the square footage of his living room in order to lay new hardwood floors. The living room has vertices at the coordina