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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started