Binary heap: Difference between revisions

Content deleted Content added
Dysprosia (talk | contribs)
last maj
Line 29:
3 4 X
 
and we want to add the number 15 to the heap. We first place the 615 in the position marked by the X. However the heap property is violated since 15 is greater than 8, so we need to swap the 15 and the 8. So, we have the heap looking as follows after the first swap:
 
11