B2.2 · Higher Level
Lists, stacks & queues
Choose and use structures according to how information must be accessed.
Learning goals
- Traverse and update lists using values and indices correctly.
- Trace push/pop and enqueue/dequeue operations.
- Justify LIFO or FIFO for a particular application.
In practice
- Model an undo stack and a service queue.
- Write guarded operations for an empty structure.
- Review programming fundamentals through list-processing tasks.
Show understanding
Correct traces, tested operations and a justified choice of structure.
Predict first. Implement second. Test deliberately. Explain what the evidence shows.