BTCCBSTWorkheet
BTCCBSTWorkheet
8. Starting from an empty binary search tree, create the binary search tree with the letters: P,
R, I, N, C, E, T, O, N
a. What keys are examined when we search for E?
b. What keys are examined when we search for Q?
9. Which of the following is not a valid binary search tree? Of the valid ones, which is fastest
to search?
10. Suppose we have integer values between 1 and 1000 in a BST and search for 363. Which
of the following cannot be the sequence of keys examined?
a. 2, 252, 401, 398, 330, 363
b. 399, 387, 219, 266, 382, 381, 278, 363
c. 3, 923, 220, 911, 244, 898, 258, 362, 363
d. 4, 924, 278, 347, 621, 299, 392, 358, 363