The worst-case time complexity of QuickSort is:
2025
The worst-case time complexity of QuickSort is:
- A.
O(n)
- B.
O(n log n)
- C.
O(n^2)
- D.
O(2^n)
Attempted by 91 students.
Show answer & explanation
Correct answer: C
QuickSort has worst-case time complexity O(n^2), for example when poor pivots repeatedly split the array very unevenly.