Quick Facts
- Comparison based sorting algorithm.
- Always \(O(n*logn)\) runtime.
- Left child: \(2 * index + 1\). Right child: \(2* index + 2\). On \(0\) indexed array.
- MaxHeap used to sort in increasing order.
- Sorts in place. No need for creating a separate array.