Skip to main content
A-LevelComputer ScienceData types and structures9618/23 · Oct/Nov 2024 · Q310 Marks

The implementation of a linked list uses an integer variable and a 1D array List of type Node. Record type Node is declared in pseudocode as follows: TYPE Node DECLARE Data : STRING DECLARE Pointer : INTEGER ENDTYPE The array List is declared in pseudocode as follows: DECLARE List : ARRAY[1:200] OF Node The linked list will operate as follows: • Integer variable HeadPointer will store the array index for the first node in the linked list. • The Pointer field of a node contains the index value of the next array element (the next node) in the linked list. • The value 0 is used as a null pointer.

  1. (a)(i)State why the value 0 has been selected as the null pointer.[1]
  2. (a)(ii)Give the range of valid values that could be assigned to variable HeadPointer.[1]
  3. (b)The array List will be initialised so that each node points to the following node. The last node will contain a null pointer. Complete the program flowchart to represent the algorithm for this operation. START[4]
  4. (c)An algorithm outputs the Data field from all nodes in the array List. The order the Data is output should be the same order it is stored in the linked list. Describe the algorithm in four steps. Do not use pseudocode statements in your answer.[4]

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 (Oct/Nov 2024). The mark or mark type is shown in brackets.

  1. [1] 0 is not a valid array / List index value // No 0th element in the array
  2. [1] 0 to 200
  3. [1] MP1 Use of variable as array index and initialisation to 1 / to first element of array
  4. [1] MP2 Loop for 199 / 200 iterations
  5. [1] MP3 Assign Index+1 to each pointer field in a loop
  6. [1] MP4 Assign 0 to 200th pointer field
  7. [1] MP1 Assign HeadPointer to ThisPointer / Current Pointer // Identify first node using headpointer
  8. [1] MP2 Loop the following until ThisPointer value is 0 (zero) / null pointer reached
  9. [1] MP3 Output data (field) from array element at index ThisPointer // Output data (field) of the current node / array element
  10. [1] MP4 Assign pointer field from current array element / index / to ThisPointer / Current Pointer // Assign pointer field from current node to ThisPointer / Current Pointer

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 →

About this question

Topic
Data types and structures, A-Level Computer Science (syllabus 9618). Structured question, 10 marks.
Source
A-Level Computer Science, Oct/Nov 2024 Paper 2 Variant 3, question 3.

Questions and mark schemes are from past examination papers and remain the copyright of the exam board. How Oracle Prep builds its content

Related Computer Science questions

© 2026 Oracle Prep