Content deleted Content added
Sam Hocevar (talk | contribs) m it's -> its |
|||
Line 19:
== Heap operations ==
=== Adding to the heap ===
If we have a heap, and we add an element, we can perform an operation known as ''up-heap'', ''bubble-up'', or ''sift-up'' in order to restore the heap property. We can do this in [[Big O notation|O]](log ''n'') time, using a binary heap, by adding the element on the bottom level of the heap regardless, then considering the added element and
Say we have a max-heap
|