Past-paper question · 2017 May-June · Paper 42 · Q2(c)(i)

Question 2(c)(i) 2017 · May-June · Paper 42 · 50 marks

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

Official answer for Question 2

Part (c)

(i)

Question 5

✓
RootPointer
✓
LeftPointer
✓
Tree Data
✓
RightPointer
✓
0
✓
[0]

Question 2

✓
Dublin

Question 1

[1]
  • 1/∅
✓
London

Question 3

[2]

Question 6

✓
Berlin

Question 5

[3]

Question 4

✓
Paris
  • 1/∅
[4]
  • 1/∅
✓
Madrid
  • 1/∅
✓
FreePointer
[5]
  • 1/∅
✓
Copenhagen
  • 1/∅

Question 7

[6]
  • 1/∅
✓
Athens
  • 1/∅
✓
1 mark
[7]

Question 8

  • 1/∅
[8]

Question 9

  • 1/∅
[9]
  • 1/∅
  • 1/∅

Mark scheme 9608_s17_ms_42.pdf →

Show text version of question

Question 2

Part (c)

(i)

Question 2

An ordered binary tree Abstract Data Type (ADT) has these associated operations:

  • create tree
  • add new item to tree
  • traverse tree

The binary tree ADT is to be implemented as a linked list of nodes.

Each node consists of data, a left pointer and a right pointer.

A
tree without any nodes Unused nodes are linked together into a free list

is represented as: as shown:

RootPointer FreePointer Ø

Ø

Ø

Ø

Ø Ø

The following diagram shows an array of records that stores the tree shown in part (b).

(i)

Add the relevant pointer values to complete the diagram.

RootPointer LeftPointer Tree data RightPointer 0 [0] Dublin

[1] London

[2] Berlin

[3] Paris

[4] Madrid

FreePointer [5] Copenhagen

[6] Athens

[7]
[8]
[9]
[5]

Question 6

Topic relevance

Why this question appears here

92% assigned-topic match · Data types and structures › Introduction to abstract data types

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

Keep practising this topic