Colors: Orange = Root, Blue = Parent, Purple = Child, Yellow = Comparing, Light Blue = Heap Boundary, Green = Sorted
Heap Sort is a comparison-based sorting algorithm that uses a binary heap data structure to sort elements efficiently.
How it works:
Time Complexity: O(n log n) guaranteed, in-place sorting