μ λ ¬ μκ³ λ¦¬μ¦Intermediate
λ³ν© μ λ ¬
λ°°μ΄μ λ°μΌλ‘ λλκ³ , κ° μ λ°μ μ¬κ·μ μΌλ‘ μ λ ¬ν λ€μ, λ€μ λ³ν©νλ λΆν μ 볡 μκ³ λ¦¬μ¦μ λλ€. O(n log n) μκ°μ 보μ₯νκ³ μμ μ μ΄μ§λ§ μΆκ° λ©λͺ¨λ¦¬κ° νμν©λλ€. ν° λ°μ΄ν°μ κ³Ό μ°κ²° 리μ€νΈ μ λ ¬μ νΉν ν¨κ³Όμ μ λλ€.
#sorting#divide-and-conquer#stable
Complexity Analysis
Time (Average)
O(n log n)Expected case performance
Space
O(n)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 2β’Section 2.3
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