Worked solution from the Data Types and Structures Paper 2 Problem-solving and Programming booklet, Part 4 of 4.
Write all three of these points.
The start pointer PS holds a null pointer, because the list is empty [1]
The free list pointer PF points to the first element of the free list [1]
All the nodes are in the free list [1]
The two variables will be of type Integer [1]
The two variables will be used as pointers (indexes) to the arrays [1]
The values stored in the two variables will indicate the first element of each list (the used list and the free list) [1]
The first 1D array will be of type String, and will be used to store the data items (user IDs) [1]
The second 1D array will be of type Integer, and will be used to store the pointers to the next item [1]
▶ Starts at Q3 (23:20)
Starts at Q3 (23:20) · by Pseudocode Pro. 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.