Cambridge AS Level Computer Science 9618 · 10.4 Introduction to Abstract Data Types (ADT)

Q68 · 9618/22/M/J/21 Q3

Worked solution from the Data Types and Structures Paper 2 Problem-solving and Programming booklet, Part 4 of 4.

Q689618/22/M/J/21original Q3Structured · 6 marks
Question 3 from 9618/22/M/J/21

Worked solution

(a)

Write: linked list [1]

(b)

Write: start pointer [1]

(c)

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]

(d)

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]

KEY IDEAA linked list is re-ordered by changing its pointers; the start pointer shows the first node and a null pointer ends the list.
TOTAL 6 marks

Official mark scheme

Mark scheme for 9618/22/M/J/21 question 3
VIDEO
▶ 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.