Question: Create a Binary Search Tree by starting with an empty tree and inserting the following keys one by one in order: 30, 18, 50, 5,
Create a Binary Search Tree by starting with an empty tree and inserting the following keys one by one in order: 30, 18, 50, 5, 24, 36
Given the Binary Search Tree in Fig. 1 : 1 2 5 1 10 1 1 1 1 15 1 1 12 1 20 Fig. 1 Answer the following questions (3 point each): a. What tree do you get if you insert 7 into the binary search tree in Fig. 1 ? b. What tree do you get if you remove 5 from the binary search tree in Fig. 1 ? c. What tree do you get if you remove 15 from the binary search tree in Fig. 1 ?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
