Order what leaves the stack
Exercise and reference answers
- Steps
- The most recent push
- The one before it
- The one before that
- The second element
- The very first push
- Instructions
- Tap the elements in the order they are popped out.
Explanation
_Source: syllabus Computer Science, Ch 3 'Stack' and Ch 4 'Queue'_