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

PLEASEE HELPPP!! A person walks first at a constant speed of 4.90 m/s along a straight line from point A to point B and then back along the line from B to A at
i need help with 9(2+w)-4=3w-10
What is 10x when I need to write 3.7 as a mixed number
he volume required to reach the equivalence point of an acid-base titration depends on the volume and concentration of the acid or base to be titrated and on th
How did the New England, Mid-Atlantic, Chesapeake, and Southern colonies develop differently? Similarly?this is really urgent for my summer assignmentthank you
Alonso _______ ensaladas y yo _______ bocadillos. Question 4 options: a) como, come b) comes, come c) come, comes d) come, como
8 + [6² - (2² + 4)] – 3² How do I solve this
who dominated nomadic pastoral societies
Bill Bonecrusher graduates from college w/ choice of playing professional football at $2 mil. a year/coaching for $50,000 a year. He decides to play football, b
Explain why 2-81273-05213-8 is an invalid UPC number. Step 1: Verify the last digit of the code. (10 points) Step 2: Identify what the last digit should be in