Heap Sort
Push every element into a Min-Heap, then pop them out one by one, the heap always gives you the smallest element first. Explore how the heap works →
Time O(n log n) | Space O(n) | Not Stable | Priority Queue-based
Data
Size7
Speed900ms
Pushed0
Popped0
n7
Input Array
38
27
43
3
9
82
10
→
Min-HeapHow it works →
Items stored0
Always emits minimumawaiting push…
push O(log n) · pop O(log n)
→
Sorted Output
awaiting pop…
Console
n = 7
>Press SORT to begin…