Heap Sort Algorithm

Heap Sort Algorithm Visually

Heap sort algorithm with step-by-step execution and animations. Learn how heap sort works with real-time visualization and multiple simulations.

Sorting Algorithm Unstable Algorithm Time Complexity O(n log n) Space Complexity O(1) Binary Heap Intermediate Level
Heap Sort Controls
gfF Ops: 0
Comparisons: 0
Steps: 0

Algorithm Status

Ready
Progress 0%

Array Visualization

About Heap Sort

Heap sort is an efficient comparison-based sorting algorithm that uses a binary heap data structure. It works by first building a max heap from the input data, then repeatedly extracting the maximum element from the heap and placing it at the end of the sorted array. It has guaranteed O(n log n) time complexity and O(1) space complexity, making it suitable for large datasets.

Time Complexity
O(n log n)
All Cases
Space Complexity
O(1)
Auxiliary

Execution Log

Operation Log
Heap sort visualization initialized
Enter array values and click Initialize to begin