Down-heap bubbling: after replacing the root element with the entry with key of the last node, the heap-order property may be violated. The algorithm down-heap restores the heap-order property by swapping the entry with key along a downward path from the root (swap the entry with key with its child with the smallest key).
Down-heap terminates when key reaches a leaf or a node whose children have keys greater than or equal to .
Since the heap has a height , down-heap runs in time.
