What is the worst case running time of quick sort algorithm?
Show answerHide answer
Correct answer: (B) θ(x²)
Explanation
Quick sort's worst case happens when the pivot is always the smallest or largest element, for example on already sorted input. Each partition then removes only one element, giving Θ(n²).