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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!