Content deleted Content added
1.) The point is fundamentally important enough to the topic to warrant a list. 2.) Fix scope ambiguity (narrow vs. wide) of the word "respectively" 3.) Use of existing MOS:COLON remains correct, now covered by a different sub-guideline |
→Extract: (non-visible) HTML-only comment "not a typo" (i.e., sic.) |
||
Line 68:
#Compare the new root with its children; if they are in the correct order, stop.
#If not, swap the element with one of its children and return to the previous step. (Swap with its smaller child in a min-heap and its larger child in a max-heap.)
Steps 2 and 3, which restore the heap property by comparing and possibly swapping a node with one of its children, are called the ''down-heap'' (also known as ''bubble-down'', ''percolate-down'', <!-- not a typo: -->''sift-down'', ''sink-down'', ''trickle down'', ''heapify-down'', ''cascade-down'', ''fix-down'', ''extract-min'' or ''extract-max'', or simply ''heapify'') operation.
So, if we have the same max-heap as before
|