Amazon Interview Question

Implement the Heap Sort function