Algorithms and programming June 2025, Question 7 9 marks
An ordered binary search tree contains the following data:
Add the following data items in the given order to the binary search tree above. 5 30 53 57 90
Reveal mark scheme
A balanced binary search tree has data consistently at each level, for example:
An unbalanced binary search tree is uneven, for example:
Describe the drawback of an unbalanced binary search tree when searching for a value.
Reveal mark scheme
A different binary search tree stores the following data:
Give the output that will be produced from a depth-first (post-order) traversal and a breadth-first traversal of this binary search tree.
Depth-first (post-order)........
Reveal mark scheme