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

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

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

Official answer for Question 3

Part (c)

✓
One mark per step:

Question 4

✓
MP1
✓
Assign HeadPointer to ThisPointer / Current Pointer // Identify
✓
first node using headpointer
✓
MP2
✓
Loop the following until ThisPointer value is 0 (zero) / null pointer
✓
reached
✓
… Output data (field) from array element at index ThisPointer //
✓
MP3
✓
Output data (field) of the current node / array element
✓
… Assign pointer field from current array element / index / to
✓
MP4
✓
ThisPointer / Current Pointer // Assign pointer field from current
✓
node to ThisPointer / Current Pointer

Mark scheme 9618_w24_ms_23.pdf →

Show text version of question

Question 3

Part (c)

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

Step 1 .......................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

Step 2 .......................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

Step 3 .......................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

Step 4 .......................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

[4]

,

,

Question 7

Question 8

, ,

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