Question: Question 1 In a max heap (largest value at the root), when we call deleteMax, the root is replaced by the last item in the
Question 1 In a max heap (largest value at the root), when we call deleteMax, the root is replaced by the last item in the heap and "trickles down" to the correct position. In the binary heap below, the last item happens to be 1. Replace the X's with actual positive values (no duplicates), so you have a legal max heap and after each of the 4 calls to deleteMax, the number 1 trickles down to the last position again. "Draw" the resulting heap after each deleteMax. (You might want to copy over your original heap four times instead of entering the numbers again.)![]()
Original Heap
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


