NAMES:

LOGINS:

PRECEPTS:

COS 226 Exercises on Binary Search Trees

References: Section 3.2 in Algorithms, 4th edition


1. Draw the sequence of binary search trees that result when you insert the following keys in that order into an initially empty tree, as in the figure on p. 233. (Draw all of the null links.)
P R I N C E T O G S

















2. How many compares are used during the process depicted in question 1?



3. Draw a perfectly-balanced binary search tree with the keys A B C D E F G, such that D is the root, then draw the sequence of BSTs that result when you delete the minimum key, one by one (using the deleteMin() algorithm described on pages 242-243).