Question: 4) (20 pts) Consider the following data 6, 10, 3, 8, 20, 1, 5, 7 a. (5 pts) Step-by-step form a Binary Search Tree (BST)

 4) (20 pts) Consider the following data 6, 10, 3, 8,

4) (20 pts) Consider the following data 6, 10, 3, 8, 20, 1, 5, 7 a. (5 pts) Step-by-step form a Binary Search Tree (BST) for the above data. What is the depth of the BST? b. (5 pts) Implement the following operations on BST in the given se- quence: Insert data 15 to the BST. What is the time complexity of inser- tion? Remove data 10 to the BST. What is the time complexity of dele- tion? Search for data 15 in the BST. What is the time complexity of search? C. (5 pts) Step-by-step form a minimum Binary Heap (BH) for the same data. What is the depth of the BH? d. (5 pts) Implement the following operations on BH in the given sequence: Search for the minimum in the BH. What is the time complexity of the minimum search? Remove the minimum from the BH. What is the time complexity of deletion? Update data 20 to 2 in the BH. What is the time complexity of update

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!