- What is the worst-case time complexity of QuickSort?
A
O(n log n)
B
O(n²)
C
O(n)
D
O(log n)
Answer and explanation
Correct Answer: B — O(n²)
QuickSort has O(n²) worst-case when the pivot is always the smallest or largest element.
ObjectiveMCQ
Print Protected
This page is protected for print. Use the website to view the content.