Hide text Hide pseudo-code | |
MinHeap is represented both as an array and binary tree. Before doing the exercise, study the following code example, and implement operations
Left-child-index(i) and Right-child-index(i) for this particular heap.
Perform DeleteMin, three times, and after each deletion, restore heap property. |
Algorithm 1 Heap-Extract-Min(A)
|