Question 1
Open questionWhat is the worst-case time complexity of QuickSort?
A
A: O(n log n)
B
B: O(n²)
C
C: O(n)
D
D: O(log n)
Answer and explanation
Correct Answer: B — B: O(n²)
QuickSort has O(n²) worst-case when the pivot is always the smallest or largest element.
