1:procedure HeapMinimum(A)
3:end procedure
4:
5:procedure HeapExtractMin(A)
6:if A.heap-size<1 then
8:end if
9:min=A[1]
10:A[1]=A[A.heap-size]
11:A.heap-size=A.heap-size−1
12:MinHeapify(A,1)
13:return min
14:end procedure
15:
16:procedure HeapDecreaseKey(A,i,key)
17:if key>A[i] then
18:error "new key is larger than the current key"
19:end if
20:A[i]=key
21:while i>1 and A[PARENT(i)]>A[i] do
22:exchange A[i] with A[PARENT(i)]
23:i=PARENT(i)
24:end while
25:end procedure
26:
27:procedure MinHeapInsert(A,key)
28:A.heap-size=A.heap-size+1
29:A[A.heap-size]=+∞
30:HeapDecreaseKey(A,A.heap-size,key)
31:end procedure