Answers using binary trees
- Draw out on paper how the binary tree evolves for the input sequence:
5 7 3 6 9 2
2 6 9
- Modify the statistical programme which you have built and which currently
gives the mean, standard deviation etc. of a sequence, so that it can optionally
print out the sequence in ascending or descending order.
The binary tree can hold the numbers. The same tree can print out either order
depending on the order in which left and right sub-trees are processed.
Back to the questions.
Back to the note on binary trees.