Quick Sort
Quick Sort selects a pivot, partitions the array around the pivot, and recursively sorts the resulting partitions. Its average expected complexity is O(n log n), but poor pivot choices can create highly unbalanced partitions and lead to O(n²) worst-case time. Randomized pivot selection or robust pivot strategies greatly reduce the probability of consistently bad partitions.
Average/expected time: O(n log n).
Worst case: O(n²).
Randomized pivoting reduces adversarial pivot behavior.
Median-of-three can improve practical pivot quality.
Typical in-place implementations use O(log n) expected recursion stack.
0-2 years experience
2-5 years experience
5-8 years experience
8+ years experience