Question: A max - heap with capacity 2 0 and size 1 0 is stored in array A with the following content. A [ 1 ]

A max-heap with capacity 20 and size 10 is stored in array A with the
following content.
A[1]=90
A[2]=80
A[3]=80
A[4]=60
A[5]=60
A[6]=70
A[7]=70
A[8]=40
A[9]=40
A[10]=50
After IncreaseKey(A,9,81), what is the value of A[1]? Seems to be 90?
After IncreaseKey(A,9,81), what is the value of A[2]?
After IncreaseKey(A,9,81), what is the value of A[3]?
After IncreaseKey(A,9,81), what is the value of A[4]?
After IncreaseKey(A,9,81), what is the value of A[9]?
 A max-heap with capacity 20 and size 10 is stored in

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 Databases Questions!