μ λ ¬ μκ³ λ¦¬μ¦Advanced
ν μ λ ¬
λ¨Όμ μ΅λ νμ ꡬμΆν λ€μ λ£¨νΈ μμλ₯Ό λ°λ³΅μ μΌλ‘ μΆμΆνμ¬ μ λ ¬νλ μ΄μ§ ν λ°μ΄ν° ꡬ쑰λ₯Ό μ¬μ©ν©λλ€. μΆκ° λ©λͺ¨λ¦¬ μμ΄ λͺ¨λ κ²½μ°μ O(n log n) μκ° λ³΅μ‘λλ₯Ό 보μ₯ν©λλ€. μ°μ μμ ν ꡬνμ κΈ°μ΄λ‘λ μ¬μ©λ©λλ€.
#sorting#heap#in-place#comparison-based
Complexity Analysis
Time (Average)
O(n log n)Expected case performance
Space
O(1)Memory requirements
Time (Best)
O(n log n)Best case performance
Time (Worst)
O(n log n)Worst case performance
π CLRS Reference
Introduction to Algorithmsβ’Chapter 6β’Section 6.4
Step: 1 / 0
500ms
SlowFast
Keyboard Shortcuts
Space Play/Pauseβ β StepR Reset1-4 Speed
Real-time Statistics
Algorithm Performance Metrics
Progress0%
Comparisons
0
Swaps
0
Array Accesses
0
Steps
1/ 0
Algorithm Visualization
Step 1 of 0
Initialize array to begin
Default
Comparing
Swapped
Sorted
Code Execution
Currently executing
Previously executed
Implementation