Question: 4.7 - Updating Heap Elements (1 point) Consider a min-heap represented by the following array: (50,53,61,57.70, 79, 68, 71) Perform the following operations using the
4.7 - Updating Heap Elements (1 point) Consider a min-heap represented by the following array: (50,53,61,57.70, 79, 68, 71) Perform the following operations using the algorithms for binary heaps discussed in lecture. Ensure the heap property is restored at the end of each individual heap operation 1 II. Push the value 40 into the min-heap Push the value 54 into this min-heap Update element 71 to have value 49 Update element 61 to have value 90 IV. What does the array representation look like after all four operations are completed? A. [40, 49, 79, 50, 54,90, 68.53,57,70] B. [40, 49, 68, 50, 54, 79, 90, 53, 57.70] C [40, 49, 50, 53, 70, 79, 54, 57,90,68] D. [40, 49, 50, 53, 54,90, 68, 79,57.70] E. None of the above
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
