Match the operation
Exercise and reference answers
- Matching pairs
- Left
- PUSH
- Right
- Adds an element at the top
- Left
- POP
- Right
- Removes the topmost element
- Left
- ENQUEUE
- Right
- Inserts at the rear of a queue
- Left
- DEQUEUE
- Right
- Removes from the front of a queue
- Left
- PEEK
- Right
- Views the front without removing it
- Left
- IS FULL
- Right
- Checks whether more can be added
- Instructions
- Match each operation on the left to what it does.
Explanation
_Source: syllabus Computer Science, Ch 3 'Stack' and Ch 4 'Queue'_