Question: Given a sequence of numbers: 8 , 5 , 2 3 , 1 2 , 1 6 , 3 , 2 0 , insert them
Given a sequence of numbers: insert them into two different data structures, a maxheap and a binary search tree BST in the given order.
Start with an empty maxheap. Insert the numbers sequentially by calling the MaxHeapInsert procedure.What is the resulting maxheap in array representation after all the numbers have been inserted? Please format your answer as a sequence of numbers separated by commas eg: A
What is the height of this maxheap?
A
Start with an empty BST Insert the same set of numbers in the given order by calling the TreeInsert procedure.What is the height of the BST after all the numbers have been inserted?A
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
