Concept Flow - Heap Sort Algorithm
Build Max Heap
Heapify from last parent to root
Swap root with last element
Reduce heap size by 1
Heapify root again
Repeat swap and heapify until heap size is 1
Sorted array ready
Heap sort first builds a max heap, then repeatedly swaps the root with the last element and heapifies the reduced heap until sorted.
