Practice
Learn
← Quit
0 / 0 correct
Algorithms
Medium
1 of 10
When does quicksort degrade to O(n^2)?
A
When the array fits in cache
B
When pivots repeatedly split the array very unevenly, e.g. always picking the first element of already sorted input
C
Never; it is always O(n log n)
D
When the input has many distinct values