Past-paper question · 2015 October-November · Paper 32 · Q4(b)

Question 4(b) 2015 · October-November · Paper 32 · 0 marks

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

Official answer for Question 4

Part (b)

Part (b)

✓
RootPtr
✓
0
✓
0

Question 1

✓
MELON

Question 2

Question 1

Question 3

✓
BEETROOT

Question 2

Question 4

✓
TURNIP

Question 3

✓
APPLE

Question 4

✓
PARSNIP

Question 5

Question 5

Question 6

✓
SWEDE

Question 6

✓
QUINCE
✓
Mark as follows:
✓
Root showing 0

Question 1

✓
Data values in correct positions

Question 1

✓
Correct left pointers

Question 1

✓
Correct right pointers

Question 1

[4]
✓
Mark Scheme
✓
Syllabus
✓
Paper
✓
Cambridge International A Level – October/November 2015
✓
9691

Question 32

Mark scheme 9691_w15_ms_32.pdf →

Show text version of question

Question 4

Part (b)

Part (b)

The binary tree is implemented in a high-level language using a number of data structures

and one variable:

Variable Data type Description RootPtr INTEGER The array subscript of the root of the tree FoodName ARRAY[0 : 2000] OF STRING Array of food names RightPtr ARRAY[0 : 2000] OF INTEGER Array of right pointer values LeftPtr ARRAY[0 : 2000] OF INTEGER Array of left pointer values

A
new dataset of food names is used as test data:

MELON, BEETROOT, TURNIP, APPLE, PARSNIP, SWEDE, QUINCE

Complete the diagram below showing the contents of the arrays and the root pointer variable.

RootPtr

LeftPtr FoodName RightPtr

0 MELON

Question 1

Question 2

Question 3

Question 4

Topic relevance

Why this question appears here

76% 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_w15_qp_32.pdf

Keep practising this topic