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

NO LINKS OR ANSWERING QUESTIONS YOU DON'T KNOW!!! Chapter 11 part 2: What are three different properties of logarithmic functions when encountering the operatio
if set a is 12345 and Set B is 23 find a union B and find a intersection b​
If fx) = 3* + 10x and x) = 4x - 2, find (f+ g)(x).​
number is equal to 6022 x 10^23
tinh S(n) = 1+2+3+.....+n
Since October 2008, the Federal Reserve has paid interest on excess reserves held by banks. Under these circumstances, if the Fed buys Treasury securities worth
The length of a rectangular photo is 1 centimeter less than three times its width. If the area of the photo is 102 square centimeters, find the length and width
what is the difference between government and governance​
Both please please………
Select the correct answer from the drop-down menu. The earliest successful attempts to explore outer space involved rockets moon missions space stations