Skip to content
Sortingcore

Quick Sort

A divide-and-conquer sort that picks a pivot and partitions the array so smaller elements precede it and larger ones follow, then recurses on each side. Fast in practice with O(n log n) average time and in-place O(log n) stack.

Best
O(n log n)
Average
O(n log n)
Worst
O(n²)
Space
O(log n)
Stable
No