Past-paper question · 2014 May-June · Paper 33 · Q4(c)

Question 4(c) 2014 · May-June · Paper 33 · 0 marks

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

Official answer for Question 4

Part (c)

Part (c)

✓
RootPtr

Question 1

✓
LeftPtr
✓
Data
✓
RightPtr
✓
r

Mark scheme 9691_s14_ms_33.pdf →

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

Topic relevance

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

Keep practising this topic