μ •λ ¬ μ•Œκ³ λ¦¬μ¦˜Intermediate

퀡 μ •λ ¬

ν”Όλ²— μš”μ†Œλ₯Ό μ„ νƒν•˜κ³  배열을 μ™Όμͺ½μ—λŠ” μž‘μ€ κ°’, 였λ₯Έμͺ½μ—λŠ” 큰 κ°’μœΌλ‘œ λΆ„ν• ν•˜λŠ” 맀우 효율적인 μ •λ ¬ μ•Œκ³ λ¦¬μ¦˜μž…λ‹ˆλ‹€. 평균 O(n log n) μ‹œκ°„ λ³΅μž‘λ„λ₯Ό κ°€μ§€λ©° μ‹€μ œλ‘œ κ°€μž₯ 널리 μ‚¬μš©λ˜λŠ” μ •λ ¬ λ°©λ²•μž…λ‹ˆλ‹€. λŒ€λΆ€λΆ„μ˜ ν”„λ‘œκ·Έλž˜λ° μ–Έμ–΄μ—μ„œ λ‚΄μž₯ μ •λ ¬ ν•¨μˆ˜μ˜ 기초λ₯Ό ν˜•μ„±ν•©λ‹ˆλ‹€.

#sorting#divide-and-conquer#in-place

Complexity Analysis

Time (Average)

O(n log n)

Expected case performance

Space

O(log n)

Memory requirements

Time (Best)

O(n log n)

Best case performance

Time (Worst)

O(nΒ²)

Worst case performance

πŸ“š CLRS Reference

Introduction to Algorithmsβ€’Chapter 7β€’Section 7.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

Quick Sort - Algorithm Vision