Exercise #1: Insertion into BSTs
For each of the sequences below
- start from an initially empty binary search tree
- show tree resulting from inserting values in order given
(a) 4 2 6 5 1 7 3
(b) 6 5 2 3 4 7 1
(c) 1 2 3 4 5 6 7
Assume new values are always inserted as new leaf nodes
|