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:
“But generally speaking philistinism presupposes a certain advanced state of civilization where throughout the ages certain traditions have accumulated in a heap and have started to stink.”
—Vladimir Nabokov (18991977)
“There is a patent office at the seat of government of the universe, whose managers are as much interested in the dispersion of seeds as anybody at Washington can be, and their operations are infinitely more extensive and regular.”
—Henry David Thoreau (18171862)