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 a conjugation of “escuchar”
hi :) why is the second last (about radiation through vacuum) false?
which phrase describes non-foliated rocks have grains in parallel layers include quartzite and marble tend to split along there bands form from crystallized
When was the Progressive Era?
what does snap do need the answer now
I'll be awarding BRAINLIEST!! :) Please help!The pair of points (6, y) and (10, -1) lie on a line with the slope 1/4. What is the value of y? A. -5. B. -2. C.
which would it be????????
who were the franks?
Read the following scenario and determine if the situation requires a direct or indirect message. You have just been offered a promotion that your friend and co
2. Simplify: b. 3(2x + 4y)