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

Q: An economist is presented with a report that presents the total value of production, adjusted for inflation. What value are they MOST likely examining? A. Re
If a figure i dilated by a cale factor of 10, the area of the figure will change by a factor of how much?
Which atom ha the electron configuration 12 2 2 2p 6 3 2 3p 6 4 2 3d 10 4p 6 5 2 4d 2 ? Why?
What is a counterclaim? a statement that includes personal opinions about a topic a statement that provides evidence for a claim a statement that takes a stand
Julius operates an athletic apparel stor. His records indicate that he had sales of 97,000. Customer return $ 2000 worth of clothing and shoes because of variou
What year did the orthodox church influence unification?
Tet if a number grade i an F (le than or equal to 65). If o, print "That' not good. ". Hint: Grade may be decimal. Sample Run Enter a Number: 60 Sample Output T
what does the combination of the hot, dry summers and abundance of dry vegetation do to the chaparral ecosystems? prone to fires
Please help Whats 9^2-10=
Morgan ha 98 baeball card in hi collection, which i twelve le than the product of 5 and the number of card Tyler ha