Question 4(b)(ii) 2021 · May-June · Paper 41 · 2 marks
Reveal official mark-scheme answer
Official answer for Question 4
Part (b)
(ii)
Question 1
mark per bullet point
Question 2
- Defining 1D array with 100 elements
- of type node, with identifier binaryTree
Show text version of question
Question 4
Part (b)
(ii)
Question 4
Chon creates a binary tree structure to store options that the user can select from a menu (M) in
his program.
M
Each node in the binary tree is stored using the following record structure:
TYPE node
leftPointer : INTEGER
data : STRING
rightPointer : INTEGER
ENDTYPE
The tree is stored as a 1D array, binaryTree. Null pointers are represented by –1.
(ii)
Write pseudocode to declare the array binaryTree to store up to 100 objects of type
node.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
.....................................................................................................................................
Why this question appears here
92% assigned-topic match · Data types and structures › Data types and records
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 9608_s21_qp_41.pdf
