| | | | | |

The Pop Heap Algorithm

  • Swap last leaf and root  
  • Remove last leaf from consideration
  • Repair downward
  • Repeat
    • identify children
    • find larger child
    • if POT not satisfied
    •   swap
    • else
    •   stop
  • Until POT

| | Top of Page | 17. Binary Heaps - 5 of 12