Xem cách xóa phần tử từ binary max heap. Cây ban đầu:

Thuật toán xóa
delete(heap, n) − Begin
if heap is empty, then exit
else
item := heap[1]
last := heap[n]
n := n − 1
for i := 1, j := 2, j <= n, set i := j and j := j * 2, do
if j < n, then
if heap[j] < heap[j + 1], then j := j + 1
end if
if last >= heap[j], then break
heap[i] := heap[j]
done
end if
heap[i] := last
EndVí dụ
Giả sử xóa 30 từ heap cuối cùng:
