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