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

How do you compare distances in words? ex: jack travels 2.45 miles to school. Wanda travels 2.31 miles to school. Compare the distance using words.
I need help with (-2)^5 + (-5)^2
Calculate the number of moles 2.25 g of Na2CO3  0.800 g of NaOH  17.75 g of Na2SO4
A carton can hold 1000 unit cubes that measure 1 inch by 1 inch by 1 inch. Describe the dimensions of the carton using unit cubes. Can you explain to me how to
find the opposite or additive inverse of 48 =
What's the algebraic expression of "15 less than a number squared"?
what is 24 ten thousands
Can some one help me ??? Anyone ?
what is m/9 - 1 = -2 whats the answer & steps
how to write 0.632 in wordform please show an example