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:

    —First a shiver, and then a thrill,
    Then something decidedly like a spill,—
    And the parson was sitting up on a rock,
    At half-past nine by the meet’n’-house clock,—
    Just the hour of the Earthquake shock!
    MWhat do you think the parson found,
    When he got up and stared around?
    The poor old chaise in a heap or mound,
    As if it had been to the mill and ground!
    Oliver Wendell Holmes, Sr. (1809–1894)

    Plot, rules, nor even poetry, are not half so great beauties in tragedy or comedy as a just imitation of nature, of character, of the passions and their operations in diversified situations.
    Horace Walpole (1717–1797)