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

Which of these is a true statement about the cost of making an Overhill jacket?
How will your health likely to affected if you follow the recommended guidelines for sleep, rest, and physical activity?
Need help please????!!!!!!
The sum of a number and 16 times it's reciprocal is 10. Find the numbers
HELP WILL GIVE BRAINIEST AND 20 POINTS!!! EXPLAIN THROUGHLY AND GIVE 5-6 SENTENCES, WHY DID PEOPLE WANT/VOTE KAMALA HARRIS BECOME VICE PRESIDENT, WHAT DO THEY S
This function chooses the screen to display based on the score.What is the correct way to call this function?
PLEASE HELP ASAP!!! i’ll mark brainlest
What did Abigail Williams do while she was having dinner at the Parris's house? A She stabbed herself O B She ate lamb C She cried for the women that will hang
who has hangouts and want to be friends owo
40 POINTS! ASAP ASAP !!! i need someone to write 2-3 paragraphs pretending they had a group discussion with 2 or 3 peers! it can be about any topic it doesn't m