Question 3(c) 2024 · October-November · Paper 23 · 4 marks
Reveal official mark-scheme answer
Official answer for Question 3
Part (c)
Question 4
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
- The value 0 is used as a null pointer.
node) in the linked list.
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 .......................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
,
,
Question 7
Question 8
, ,
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
