Heap Sort Algorithm

Generic Max Heap + Heap sorting algorithm together with explanations.