μ λ ¬ μκ³ λ¦¬μ¦Beginner
μ½μ μ λ ¬
μμ μλ μΉ΄λλ₯Ό μ λ ¬νλ κ²μ²λΌ μλν©λλ€ - κ° μμλ₯Ό ν λ²μ νλμ© μ μ ν μμΉμ μ½μ ν©λλ€. μ΄λ―Έ μ λ ¬λ λ°μ΄ν°μ λν΄ O(n) μκ°μ μ€νλλ―λ‘ μμ λ°°μ΄μ΄λ κ±°μ μ λ ¬λ λ°μ΄ν°μ μ λ§€μ° ν¨μ¨μ μ λλ€. κ°λ¨νλ©΄μλ μ μν μκ³ λ¦¬μ¦μ λλ€.
#sorting#stable#in-place#adaptive
Complexity Analysis
Time (Average)
O(nΒ²)Expected case performance
Space
O(1)Memory requirements
Time (Best)
O(n)Best case performance
Time (Worst)
O(nΒ²)Worst case performance
π CLRS Reference
Introduction to Algorithmsβ’Chapter 2β’Section 2.1
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