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

Gianna has $0.90 worth of nickels and dimes. She has 7 times as many nickels as dimes. By following the steps below, determine the number of nickels, x, commax,
I need help with this please
1.5 g of MgCl2 is dissolved in water to make a total volume of 750 mL. What is the concentration of the solution in mol/L?
If a __________ tire blows out, the vehicle will pull sharply in the direction of the blowout?
A jeweller melts 500 g of silver to pour into a mould. Calculate how much energy was released as the silver solidified.
WILL GIVE BRAINLIEST, 100 POINT QUESTION, PLEASE GIVE FULL ANSWER
PLEASE HELP ASAP!! Select the correct answer. Micah took out a student loan for $20,000, which began accruing interest immediately. He has chosen not to begin
The teacher………………………..(speak) to the children right now.
7 kg of gold at 72 C cools to 26 C. The specific Heat of Gold is 129. How much heat is given off?
what are aice classes and what do they do they do for highschools students