Past-paper question · 2024 October-November · Paper 23 · Q3(b)

Question 3(b) 2024 · October-November · Paper 23 · 4 marks

Original past-paper question for 3(B)
Original past-paper question for 3(B)
Reveal official mark-scheme answer Official mark-scheme answer for 3(B)

Official answer for Question 3

Part (b)

Question 4

✓
Mark as follows:
✓
MP1 Use of variable as array index and initialisation to 1 / to first element of
✓
array
✓
MP2 Loop for 199 / 200 iterations
✓
MP3 Assign Index+1 to each pointer field in a loop
✓
MP4 Assign 0 to 200 th pointer field
✓
Cambridge International AS & A Level – Mark Scheme
✓
9618/23
✓
October/November
✓
PUBLISHED
✓
2024
✓
Question
✓
Answer
✓
Marks

Mark scheme 9618_w24_ms_23.pdf →

Show text version of question

Question 3

Part (b)

Question 3

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.

Part (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

END

[4]

Question 6

, ,

Topic relevance

Why this question appears here

71% assigned-topic match · Algorithm design and problem-solving › Algorithms

Topic-match percentages estimate how closely each question fits the selected syllabus topic. They are a guide for choosing stricter or broader practice.

Permanent source page: Educate A Change · From 9618_w24_qp_23.pdf

Keep practising this topic