1:procedure D-MaxHeapInsert(A,key)
2:A.heap-size=A.heap-size+1
3:A[A.heap-size]=−∞
4:D-HeapIncreaseKey(A,A.heap-size,key)
5:end procedure
6:
7:procedure D-HeapIncreaseKey(A,i,key)
8:if key<A[i] then
9:error "new key is smaller than current key"
10:end if
11:A[i]=key
12:while i>1 and A[D-Parent(i)]<A[i] do
13:exchange A[i] with A[D-Parent(i)]
14:i= D-Parent(i)
15:end while
16:end procedure