heapSort Visualization

500 ms
Current Node Being Heapified Comparing Children Swapping Nodes Sorted (Final Position)

Description

Heapsort is an efficient comparison based algorithm that uses a special binary tree structure called a min-heap (or max-heap for ascending/descending variations). In a min-heap, each parent node is smaller than or equal to its children, ensuring the smallest element is always at the root.