Question: 1)Suppose you create an empty tree and items are inserted as follows: TreeNode * tree = NULL; insert(5, &tree); insert(8, &tree); insert(2, &tree); insert(1, &tree);
1)Suppose you create an empty tree and items are inserted as follows: TreeNode * tree = NULL; insert(5, &tree); insert(8, &tree); insert(2, &tree); insert(1, &tree); insert(10, &tree); insert(7, &tree); insert(9, &tree); insert(12, &tree); a. What does the BST look like? b. What nodes are examined when finding 7? c. What nodes are examined when finding 3?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
