Binary Heap - Heap Operations

Heap Operations

Both the insert and remove operations modify the heap to conform to the shape property first, by adding or removing from the end of the heap. Then the heap property is restored by traversing up or down the heap. Both operations take O(log n) time.

Read more about this topic:  Binary Heap

Famous quotes containing the words heap and/or operations:

    A heap of epithets is poor praise: the praise lies in the facts, and in the way of telling them.
    —Jean De La Bruyère (1645–1696)

    It may seem strange that any road through such a wilderness should be passable, even in winter, when the snow is three or four feet deep, but at that season, wherever lumbering operations are actively carried on, teams are continually passing on the single track, and it becomes as smooth almost as a railway.
    Henry David Thoreau (1817–1862)