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

Question 2(b) 2017 · May-June · Paper 42 · 2 marks

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

Official answer for Question 2

Part (b)

✓
one mark per bullet

Question 2

✓
•
✓
node with ‘Athens’ linked to left pointer of Berlin (ignore null pointer)
✓
•
✓
null pointers in left and right pointers of Athens

Mark scheme 9608_s17_ms_42.pdf →

Show text version of question

Question 2

Part (b)

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.

Part (b)

The following diagram shows an ordered binary tree after the following data have been

added:

Dublin, London, Berlin, Paris, Madrid, Copenhagen

RootPointer

Dublin

Ø Berlin Ø London

Ø Copenhagen Ø Paris Ø

Ø Madrid Ø

Another data item to be added is Athens.

Make the required changes to the diagram when this data item is added.

[2]

Question 5

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