previous | start | next

Removing an Arbitrary Node from a Heap

  1. Promote the smaller child of the root node.
    Root node again fulfills the heap property. Repeat process with demoted child.
    Continue until demoted child has no smaller children. Heap property is now fulfilled again.
    This process is called "fixing the heap".


previous | start | next