Past-paper question · 2021 May-June · Paper 43 · Q4(b)(ii)

Question 4(b)(ii) 2021 · May-June · Paper 43 · 2 marks

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

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
✓
Example:
✓
DECLARE binaryTree : ARRAY[0:99] OF node
✓
9608/43
✓
Cambridge International AS & A Level – Mark Scheme
✓
May/June 2021
✓
PUBLISHED
✓
Question
✓
Answer
✓
Marks

Mark scheme 9608_s21_ms_43.pdf →

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

C
R
A
G L W

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.

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

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

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

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

[2]
Topic relevance

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_43.pdf

Keep practising this topic