Extract Min

Now that we can create a heap, how can we remove things from it?

Clearly the minimum element is at the top.

Now the number of elements in the heap has decreased by one.

Which node should we move to the root?

How do we restore the heap property?

Running Time?


next up previous
Next: Insert Up: HEAPS Previous: Build-Heap Analysis