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

Find the value of f(-6).
Direct observation is the simplest and most effective method to determine population size Please select the best answer from the choices provided OT F
Hannah wrote the paragraph below about human errors that were made during the Chicago fire of 1871. Several key human errors contributed to the spread of the Ch
For a custom App uploaded to Microsoft Teams, if an organization wants to disallow users from updating the settings of the custom tab, which attribute name must
A certain mass of hydrogen gas collected over water at 10°C and 750mmHg pressure has a volume of 57cm3. Calculate the volume when it is dry at S.T.P ( S.V.P of
If a companies earnings were $640 and the commission Rate was 3% what is the commission
Which political party believed the government had no right to take any action that was not specifically described in the Constitution? Democratic Republican Dem
When enthalpy of reactants is higher than the product then the reaction will be.
Given that Cos A=513and angle A is acute. Find the value of 2tan A + 3sin A without using a calculators.
Excuse Letter For Knee Injury For School​