removing root from a binary heap

Removing root from a binary heap involves two steps: (1) swapping the root with the last element in the heap, and (2) restoring the binary heap property by sifting down the new root to its correct position.

Requires login.