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 of the following is not a current trend impacting the health safety and nutrition of children? decrease in children living in poverty increase in children
What is the maximum number of communication paths for a team of twenty people?
Professional who specializes in analyzing and designing business systems is
help. chemistry...........
in the modoc myth what do the grizzly bears do that angers the Chief of the sky spirits
Insert parentheses to make statement true 17-8-5=14
The set of instructions that a computer will follow is known as
Why did the Allies agree to focus on Europe before Asia during World War II? A. They saw Germany as the greatest threat.   B. Japan was showing signs of a
Write a paragraph in which you compare and contrast how the poets use topic, rhyme scheme, and figurative language to convey their themes. phillis wheatly and
The table shows the outputs, y, for different inputs, x: Input (x) 3 4 5 6 Output (y) 3 4 5 6 Part A: Do the data in this table represent a function? Justify yo