Question 2(c)(ii) 2017 · May-June · Paper 42 · 2 marks
Reveal official mark-scheme answer
Official answer for Question 2
Part (c)
(ii)
- 1
Question 2
Show text version of question
Question 2
Part (c)
(ii)
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.
is represented as: as shown:
RootPointer FreePointer Ø
Ø
Ø
Ø
Ø Ø
The following diagram shows an array of records that stores the tree shown in part (b).
(ii)
Give an appropriate numerical value to represent the null pointer for this design. Justify
your answer.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
.......................................................................................................................................[2]
Why this question appears here
82% 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
