Question: Let the following array represent a min - heap. 1 2 3 4 4 4 5 6 7 8 1 0 9 1 1 1

Let the following array represent a min-heap.
1
2
3
4
4
4
5
6
7
8
109
111213
13
2116
243119
686526
32
1. If we insert the element 7 in the above mentioned min-heap, then what array index will it be inserted on initially? And what position will it finally hold such that the min-heap property does not violate?
2. If we perform a deletemin() operation on the above mentioned min-heap, then what should be the index of the element 26 in the above mentioned array, such that the property of min-heap does not violate.

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!