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

Nidhi is creating a rectangular garden in her back yard. The length of the garden is 10 feet. The perimeter of the garden must be at least 40 feet and no more t
749,381 in standard form
Briefly describe how wind and ocean currents are created and how they affect Earth’s climate.
what is one use of the mineral gypsum ​
Zoroastrianism developed in which ancient empire? O Assyrian O Greek O Phoenician O Persian
differentiate between formal and social demography with Four Points​
Following the Civil War, what percentage of money in circulation was counterfeit? 25percent 33percent 100percent 60percent
what are the starting substances in a chemical reaction called
carbohydrates are made up of ____ A. Monosaccharides B. Isomers C. Polypeptide chains of amino acids D. A sugar, a phosphate, and a base I’ll mark brainliest!
Helppppppppppppp0ppppppp