In-place sort.

Running time: O(n lg n)

**Heaps**

**Heap:** An array A representing a complete binary tree for
HeapSize(A) elements satisfying the heap property:

for every node i except the root node.

Because the array may hold more numbers than are contained in the heap,
HeapSize(A) length(A) (heap insertion and deletion)

**parent(i)**=

**left(i)**=? 2i

**right(i)**=? 2i + 1