Worked solution from the Data Types and Structures Paper 2 Problem-solving and Programming booklet, Part 4 of 4.
Write: linked list [1]
Write: start pointer [1]
Write the term and the meaning:
Term: null pointer [1]
Meaning: there are no further nodes in the list (it is the last node) [1]
Sort the names alphabetically: Cat, Dolphin, Elk, Fish. Only the pointers change, not the nodes. Draw:
Start pointer → Cat → Dolphin → Elk → Fish → null pointer
Start pointer drawn pointing to the Cat node [1]
Remaining arrows drawn as Cat → Dolphin → Elk → Fish (Fish has the null pointer) [1]
▶ Whole paper
Video solution of the whole paper · by Papersdock. Tap the picture to open it on YouTube.
Solutions follow the official Cambridge mark schemes; marks are shown in grey. Videos are from other YouTube channels. Paper codes read component / series / year: M/J = May/June, O/N = October/November. Past-paper questions © UCLES, reproduced for classroom practice.