Question: a ) Draw a Max Heap tree using the following array of elements that includes key ( integer ) and data - value ( string
a Draw a Max Heap tree using the following array of elements that includes key integer and datavalue string:
AliDavBobMatWilMadAnnAlex
Write down the steps you followed to construct the Max Heap tree from the given array. Ensure that the tree structure adheres to the properties of a Max Heap.
b Consider the given Max Heap tree. Insert a new node with the key and datavalue "Tar" into the Max Heap tree. Follow all rules of upheap and downheap as necessary to maintain the Max Heap property.
c Remove the maximum node from the tree. After removing the minimum node, update the tree while following all downheap rules as necessary to maintain the Max Heap property.
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
