AQA 7517 4.2.3.1: Stacks
The free BugBot lesson that teach this point, a robot to try it on, and the past-paper questions that test it.
What it covers
When you press undo, the last thing you did is the first thing to be taken back. That rule, last in first out, is a stack, and it is the first abstract data type in this module. In this lesson BugBot keeps a stack of its moves, so it can undo them one at a time and drive home.
- Abstract data types
- Static and dynamic structures
- The stack
- Tracing a stack
- Undoing moves
- Where stacks are used
Or do it in the simulator, with tasks that mark themselves
Lessons that teach it
- A3.2 Abstract data types and stacks Data structures
ADTs, static and dynamic structures, and a stack with a top pointer: an undo stack for the robot's moves.
Try it on a robot
The task from A3.2 Abstract data types and stacks, running here. Change the program and press Run.
The specification is AQA's own document; this page says which of our lessons teach point 4.2.3.1 and is not endorsed by the board.