Quick Sort
Quick sort partitions around a pivot, then sorts the two sides. Balanced pivots give log n levels. A bad pivot every time gives n levels.
Costs
| Category | Algorithm |
| Difficulty | Medium |
| Average | O(n log n) |
| Worst | O(n²) |
| Extra memory, typical recursion | O(log n) |
Questions
What is Quick Sort?
Quick sort partitions around a pivot, then sorts the two sides. Balanced pivots give log n levels. A bad pivot every time gives n levels.
Where do I practice it?
DSA Master keeps challenges and progress on the phone. This page is the idea and the costs.