1.
What is the worst-case time complexity of Quick Sort?
A
O(n log n)
B
O(n)
C
O(n²)
D
O(log n)
Answer and explanation
Correct Answer: C — O(n²)
Quick Sort's worst case O(n²) occurs when the pivot is always the smallest or largest element (e.g., already sorted array with first element as pivot). Average case is O(n log n).
