Question 4(c) 2014 · May-June · Paper 33 · 0 marks
Reveal official mark-scheme answer
Official answer for Question 4
Part (c)
Part (c)
Question 1
Show text version of question
Question 4
Part (c)
Question 4
A binary tree is used to store a list of sports.
The tree currently has seven sports as shown below:
JUDO
ATHLETICS SOCCER
HOCKEY SAILING SWIMMING
WRESTLING
The binary tree is implemented in a high-level language with the following data structures:
Variable Data type Description
RootPtr Array subscript for the root of the tree
Data Array of sport names
RightPtr ARRAY[1 : 2000] OF INTEGER Array of right pointer values
LeftPtr ARRAY[1 : 2000] OF INTEGER Array of left pointer values
Part (c)
The first seven sports joined the tree in the order:
JUDO, SOCCER, SAILING, SWIMMING, ATHLETICS, WRESTLING, HOCKEY.
Complete the diagram below showing the contents of the arrays and the RootPtr variable.
RootPtr
LeftPtr Data RightPtr
1 JUDO
Question 2
Question 3
Question 4
Why this question appears here
86% assigned-topic match · Data types and structures › Arrays
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 9691_s14_qp_33.pdf
