MaxHeap: For each i > 1:
i > 1
A[PARENT(i)] ≥ A[i]
MinHeap For each i > 1:
A[PARENT(i)] ≤ A[i]
This document was last updated 30.5.2011. Please send your comments to Mikko Laakso, Ari Korhonen, and Ville Karavirta.