Concept Flow - Heap Sort Algorithm
Build Max Heap from array
Extract max element (root)
Swap root with last element
Reduce heap size by 1
Heapify root to restore max heap
Repeat extraction until heap size is 1
Sorted array in ascending order
Heap sort builds a max heap, then repeatedly extracts the largest element by swapping it to the end and restoring the heap until sorted.
