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 obtained
Heap sort first builds a max heap from the array, then repeatedly extracts the largest element by swapping the root with the last element and heapifying the root, shrinking the heap each time until sorted.