Question: Question 1 a) Draw the binary search tree structure after inserting the following integer search key values (in the order given) into an empty binary

Question 1 a) Draw the binary search tree structure after inserting the following integer search key values (in the order given) into an empty binary search tree: [85, 93, 60, 33, 26, 89, 13]. Using a tree diagram (not an array), show the structure of the heap after each insertion. b) What does the tree look like after removing the value 85 from the tree ?

Question 2

a) Draw the heap structure after inserting the following integer search key values (in the order given) into an empty min-heap: 23, 22, 63, 29, 47, 3. Using a tree diagram (not an array), show the structure of the heap after each insertion. b) Consider the heap structure from part a), what does the heap structure look like after removing the root and restoring the heap order? Show the steps involved. Include a brief explanation of the steps. c) What does the heap structure look like if we build a heap from a Python list [23, 22, 63, 29, 47, 3] using the perc_down() method? Show the steps involved. Include a brief explanation of the steps.

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!