Question: 1. Using the array A= [14 12 3 8 16 4 20] with n-8 elements, build the heap first and draw how the tree will
1. Using the array A= [14 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 these operations. BuildMaxHeap (A, n) 1 for (i-floor (n/2);L>-1;i--) 2 MaxHeapify (A, n,i) a. After ExtractMax() b. After Insert(10) this is called after calling ExtractMax() above 2. Draw subsequent steps during Insert of a key "16" into the following B-trees. Use the Note that some children are not shown for brevity. algorithm that makes preemptive node splitting. In both trees, t-2 A) B) 6 25 21
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
