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:
“Now he saw by the heap of shavings still fresh at his feet, that, for him and for his work, the former lapse of time had been an illusion.”
—Henry David Thoreau (18171862)
“You cant have operations without screams. Pain and the knifetheyre inseparable.”
—Jean Scott Rogers. Robert Day. Mr. Blount (Frank Pettingell)