6 marksAbstract Data Types (ADTs)
CAPE Computer Science Unit 2 · 2012 · Paper 2 · Question 1(c)
Given a queue q with an unknown number of elements and a stack stk, write an algorithm using only Stack and Queue ADT operations to reverse the order of elements in q.
The mark scheme is shown once you've answered.
Practise this question