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

The table represents the monthly fees for checking accounts at two banks. Bank Monthly fee L 1% of checking account balance Р S6 Which statement is best support
Homeostasis is a tendency to remain more or less stable. In nature, this is maintained primarily by _________
What are the five color families?​
Which statement best evaluates how well this narrative establishes a clear focus?
WILL MARK BRAINLEST This table shows a proportional relationship. x −4 −2 0 2 4 y −14 −7 0 7 14 Which ordered pair could also belong to this relationship?
Do you think all news is biased?
HELP WHY DOES MY THISIS SOUND SO CHOPPY (can u help me fix it? ) Here is my thesis Mr. Lorry is a very loyal person. He escorted Dr.Mannet out of France, He he
x+10=2x-4 what does x=
Which of the following causes spontaneous episodes of vertigo? 4 points Cataract Glaucoma Meniere's Disease Otitis Media
What is work? A. The amount of force applied over time B. The product of a force moving something over a distance C. The total amount of time it takes to move s