Login or Create an Account to view the mark scheme, comment, and add to a test
Describe a recursive function called reverse(buffin, buffout, hay) which moves values from a queue called buffin into another queue called buffout. Use an intermediate stack called hay such that resultant numbers in buffout are, with respect to their original sequence in BUFFIN, in reverse order. Both buffout and hay are initially empty.

Short Answer5 MarksPremium
28 Uses46 Views0 Likes