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

What type of figurative language is being used? “And I will come again, my love, [even if] it were ten thousand miles.” a. personification b. onomatopoeia c.
Help plsss! find the area of the shaded region
pa help po please......​
please answer 5,6, and 7 for 20 points plus brainliest :) link=reported, those dont help
NEED HELP ASAP!!!! Artist: Georges Suerat (pronounced zhorzh syu-RAH) For each of the questions below, circle the letter for the correct answer (1 point each).
Model a hydrogen atom as a three-dimensional potential well with Uo = 0 in the region 0 < x a. 283 eV b. 339 eV c. 113 eV d. 226 eV
How to factor 8x^2+4−12
Can someone plzzzz helppp meeeee
Should individuals be prosecuted for statements made on social media? I have to right an essay about this but with evidence and I need to turn it in by Friday
malaria with pregnancy​