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

The fungi that produce penicillin, the fungi that we use to make bread, the fungi that we use to brew alcoholic drinks, and the fungi that we eat as truffles, a
How to solve number one
Transcriptionally inactive genes:________, 1. are not resistant to DNase I. 2. often do not contain acetylated lysines in their histone tails. 3. are always loc
How did Fordism affect American labor?
Need help show work???????
______ Was once widely used in the united states as a gasoline additive
When you're in high school, you won't have the same emergency expenses as your _________. For you, a surprise expense might be fixing a flat tire or replacing a
Cheyanne, the regional manager of a global sales organization, gives freedom to the sales representatives on the amount spent on gifts for prospective Asian and
$800 is deposited in an account that pays 9% annual interest, compounded annually. Find the balance after four years.
does this ad use the rule of thirds?​