Concept Flow - Heap Sort Algorithm
Build Max Heap
Heapify Subtrees
Swap Root with Last Element
Reduce Heap Size
Heapify Root Again
Repeat Until Heap Size is 1
Sorted Array Ready
Start by building a max heap from the array, then repeatedly swap the root with the last element, reduce heap size, and heapify the root until sorted.
