Question: In class, we have studied max - heap and its operations. The min - heap data structure is defined similarly, with max replaced by min,

In class, we have studied max-heap and its operations. The min-heap data
structure is defined similarly, with max replaced by min, greater than
replaced by less than, etc. The operations of min-heap is also symmetric to
the corresponding operations of the max-heap. This questions is about min-
heap.
A min-heap with capacity 20 and size 10 is stored in array A with the
following content.
A[1]=20,
A[2]=30,
A[3]=30,
A[4]=50,
A[5]=50,
A[6]=40,
A[7]=40,
A[8]=70,
A[9]=70,
A[10]=60.
After DecreaseKey(A,10,11), what is the value of A[1]?
After DecreaseKey(A,10,11), what is the value of A[2]?
After DecreaseKey(A,10,11), what is the value of A[3]?
After DecreaseKey(A,10,11), what is the value of A[5]?
After DecreaseKey(A,10,11), what is the value of A[10]?
 In class, we have studied max-heap and its operations. The min-heap

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!