Question: Using the array A= [1 4 12 3 8 16 4 20] with n=8 elements, build the heap first and draw how the tree
![Using the array A= [1 4 12 3 8 16 4 20]](https://dsd5zvtm8ll6.cloudfront.net/questions/2024/03/6603999e0de38_1711515474378.jpg)
Using the array A= [1 4 12 3 8 16 4 20] with n=8 elements, build the heap first and draw how the tree will look like after each of the (MaxHeapify) operation. Build MaxHeap (A, n) 1 for (i=floor (n/2); i>=1; i--) 2 MaxHeapify (A,n,i) a. After ExtractMax() b. After Insert(10) - this is called after calling ExtractMax() above
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
