Beginner
Data Structures & Algorithms
Q24 / 100
What is the worst-case time complexity of quicksort?
Correct! Well done.
Incorrect.
The correct answer is C) O(n²)
C
Correct Answer
O(n²)
Explanation
Quicksort degrades to O(n²) when the pivot is always the smallest or largest element (e.g., sorted input with naive pivot selection). Randomized pivot reduces this risk.
Progress
24/100