4 20 Pts Consider Following Data 6 10 3 8 20 1 5 7 5 Pts Step Step Form Binary Search Tre Q43867624
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? Show transcribed image text 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?
Expert Answer
Answer to 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)…
OR