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

Help please!! I’ll give brainliest.....
Which shows a difference of squares?10y2 – 4x216y2 – x28x2 – 40x + 2564x2 – 48x + 9
Which events brought unity to europe and which events brought disruption?
Please Help I Will Give Brainlest
What types of activity might decrease the battery life of a fully charged battery?
The width of a rectangular pool is 5 meters longer than the length. The perimeter of the pool is 58 meters. Use and equation to find the pools length.
Vous pouvez m’aidez
Hirohito's son, Akihito, succeeded him as emperor, beginning what was officially known as the era of Heisei, which means _______.
Part A: Factor 5x2b2 + 14xb2 − 3b2. Show your work. (4 points) Part B: Factor x2 − 18x + 81. Show your work. (3 points) Part C: Factor x2 − 121. Show your wor
what is the equation of a circle with a center located at 0, -2 in a circumference of 16*3.14