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

What is lanugo? very fine, soft hair on the face and arms of people with anorexia nervosa a sudden drop in blood pressure from excessive dieting a side effect o
The subfield of geography and geology concerned with the study of the origins, evolutions, form, and spatial distribution of the earth's landforms is
Khaleem wanted to draw a triangle where the sides measured 5 cm,8 cm,and 7 cm.How many unique triangles could Khaleem draw that fit the dimensions?
Briefly explain how skips can be traced
Consider the attached diagram if the box weighs 100 N in what direction is the support force A) up B) down C) left D) right
Explain the difference between subsistence and commercial agriculture. (Site 1)
The history of the ancient Hebrews comes from the ____, ( hebrew bible, prophets, ketuvim, writings) which contains a collection of oral histories passed down t
Which of the following is the balanced chemical equation for photosynthesis?
She could see in the open square before her house the tops of trees that were all aquiver with the new spring life. The delicious breath of rain was in the air.
Which process is a feature of webmail? A.)allows user collaboration when creating content B.)downloads messages to the client’s machine C.)helps to conduct meet