- Introduction
- Array Representation of Binary Heap
- MinHeap vs. MaxHeap
- Insert
- DeleteMax
- Preserving the Heap Order Property
- BuildHeap
- HeapSort
- Analysis

**MaxHeap: **For each `i > 1`

:

A[PARENT(i)] ≥ A[i]

- The element with the largest priority is at the root node
- The element with the smallest priority is in a leaf node

**MinHeap** For each `i > 1`

:

A[PARENT(i)] ≤ A[i]

- The element with the smallest priority is at the root node
- The element with the greatest priority is in a leaf node

This document was last updated 30.5.2011. Please send your comments to Mikko Laakso, Ari Korhonen, and Ville Karavirta.