Algorithm 2 Max Heap Delete
1: // a lazier and slower version
2:procedure MaxHeapDelete()
3:HeapIncreaseKey()
4:HeapExtractMax()
5:end procedure
6:
7: // a faster but more complex version
8:procedure MaxHeapDelete()
9:if then
10:
11:MaxHeapify()
12:else
13:HeapIncreaseKey()
14:end if
15:
16:end procedure