Quick Sort (Recursive)
Partition array around pivot then sort partitions.
recursionsortingquick-sortUpdated 2025-09-01
Complexity
- Average O(n log n)
- Worst O(n^2) bad pivots
Pivot
- Choose random / median-of-three to reduce worst-case
Partition array around pivot then sort partitions.