The diagram shows an Abstract Data Type (ADT) representation of a linked list after data items have been added. • PS is the start pointer. • PF is the free list pointer. • Labels Df, Dc, Db and Dy represent the data items of nodes in the list. • Labels Fg, Fh, Fm and Fw represent the data items of nodes in the free list. • The symbol Ø represents a null pointer. [Figure X.X]
- (a)Describe the linked list immediately after initialisation, before any data items are added.[3]
- (b)A program will be written to include a linked list to store alphanumeric user IDs. The design uses two variables and two 1D arrays to implement the linked list. Each array element contains data of a single data type and not a record. The statements below describe the design. Complete the statements. The two variables will be of type The two variables will be used as The values stored in the two variables will indicate The first 1D array will be of type The first 1D array will be used to The second 1D array will be of type The second 1D array will be used to to the arrays.[5]
This question uses a diagram from the original paper, which isn't shown here. Open the full paper from the past papers archive to see it.
Mark scheme
Marking points from the official mark scheme (May/June 2024). The mark or mark type is shown in brackets.
- [3] One mark per point:
- 1 The PS contains a null pointer
- 2 The PF points to the first element on the free list
- 3 All the nodes are on the free list
- [5] Max 2 marks for 'Variables':
- The two variables will be of type Integer
- The two variables will be used as pointers / indexes to the arrays.
- The values stored in the two variables will indicate the first element in each list
- The first 1D array will be of type String
- The first 1D array will be used to store the values // data items // User IDs
- The second 1D array will be of type Integer
- The second 1D array will be used to store the pointers // point to next item
- Mark as follows:
- One mark for each of the first three rows
- One mark for both Array 1 rows
- One mark for both Array 2 rows
Write your answer and get it marked
On Oracle Prep you can write or photograph your own answer and have it marked by AI against this mark scheme, with feedback on what you missed.
Sign up free →