1 A binary search tree, colour, stores data about colours that are entered into a computer.
(a) A binary search tree is one example of a type of
... [Show More] tree.
(i) State the main features of a tree.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...................................................................................................................................... [3]
(ii) State the features that make a tree a binary search tree.
...........................................................................................................................................
...................................................................................................................................... [1]
(b) The current contents of colour are shown.
Add the following colours to the tree above in the order written:
Brown White Orange Purple
[4]
(c) A second binary search tree, numbers, stores numbers that are entered into a computer. The contents of the tree are shown below:
(i) Explain, using the binary search tree numbers as an example, how a depth-first (post-order) traversal is performed.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...................................................................................................................................... [5]
(ii) Explain, using the binary search tree numbers as an example, how [Show Less]