Question: A max - heap with capacity 1 2 and size 1 0 is stored in an array with the following content: A ( 1 )

A max-heap with capacity 12 and size 10 is stored in an array with the following content: A(1)=10, A(2)=8, A(3)=9, A(4)=7, A(5)=7, A(6)=6, A(7)=6, A(8)=4, A(9)=4, A(10)=5. Note that I have used parentheses rather than square brackets to denote the element of the array due to the syntax of Canvas. The following questions are all about applying a specific operation to the max-heap described in the above (not the resulting max-heap).(a1) After ExtractMax(A), what is the value of A(1)?
(a2) After ExtractMax(A), what is the value of A(10)?(a3) After ExtractMax(A), what is the value of A(6)?(a4) After ExtractMax(A), what is the value of A(3)?(a5) After ExtractMax(A), what is the value of A(2)?(b1) After Increasekey(A,9,9), what is the value of A(1)?(b2) After Increasekey(A,9,9), what is the value of A(2)?(b3) After Increasekey(A,9,9), what is the value of A(3)?(b4) After Increasekey(A,9,9), what is the value of A(4)?(b5) After Increasekey(A,9,9), what is the value of A(9)?(c1) After Insert(A,11), what is the value of A(1)?(c2) After Insert(A,11), what is the value of A(2)?(c3) After Insert(A,11), what is the value of A(3)?(c4) After Insert(A,11), what is the value of A(5)?(c5) After Insert(A,11), what is the value of A(11)?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!