Heap Sort
An in-place algorithm that rebuilds the array into a max-heap and repeatedly extracts the root (maximum) to sort. Guarantees O(n log n) even in the worst case.
01 Explore How It Works
Interactive Step-by-Step힙 정렬을 시작합니다. 배열을 Max Heap으로 재구성(Heapify)한 뒤, 루트(최댓값)를 하나씩 추출합니다.
02 Understand It Simply
For EveryoneRepeatedly take the top off a pile that always keeps the maximum on top.
Builds a heap, then repeatedly pops the max and fills from the back.
Guarantees O(n log n) with no extra memory.
- –Memory-constrained sorting
- –priority-based processing
03 Python Implementation
A clean, readable reference implementation of the core logic of Heap Sort.
04 Frequently Asked Questions
FAQWhat is Heap Sort?+
An in-place algorithm that rebuilds the array into a max-heap and repeatedly extracts the root (maximum) to sort. Guarantees O(n log n) even in the worst case.
What is the time complexity of Heap Sort?+
The time complexity of Heap Sort is O(n log n). Follow the step-by-step visualization to see exactly why.
Where is Heap Sort used?+
Memory-constrained sorting, priority-based processing.
What's a simple analogy for Heap Sort?+
Repeatedly take the top off a pile that always keeps the maximum on top.
