9618/22/M/J/21 question 3: worked solution (May/June 2021, paper 22)

Show as plain text

Cambridge AS Level Computer Science 9618 · 10.4 Introduction to Abstract Data Types (ADT) Worked solution from the Data Types and Structures Paper 2 Problem-solving and Programming booklet, Part 4 of 4. Q68 9618/22/M/J/21 original Q3 Structured · 6 marks 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 IDEA A 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 VIDEO ▶ Whole paper Video solution of the whole paper · by Papersdock. Tap the picture to open it on YouTube.