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

A technical drawing that documents an architecture or engineering design is known as a blueprint . true or False​
How are the different species of kelp adapted to the depths at which each lives?
Read the paragraph. Our football team is tough to beat because we win almost all of our games. Our football team’s record is 10–1. Last week, our team beat the
HELP ASAP ILL MAKE YOU THE BRAINIEST find the value of c
What has been one major problem in South Africa since the end of apartheid?
Which side dish is commonly served with fish and chips?.
Explain five ways HIV can change your life
What is the area of the following figure if a = 13, b = 5, and c = 12?
A shipping company needs to hire new people to fill a variety of positions in its warehouse and distribution center. some common qualifications these employees
In which sections of your organizer should the outline be located? a. Heading c. Vocabulary b. Topic d. None of these Please select the best answer from the cho