Up-heap bubbling: After the insertion of a new entry with key , the heap-order property may be violated. The algorithm up-heap restores the heap-order property by swapping entry with the key along an upward path from the insertion node. Up-heap terminates when the entry with key reaches the root or a node whose parent has a key smaller than or equal to . Since the heap has a height , up-heap runs in time.