What is the worst case running time of quick sort algorithm?
- AΘ(x log2x2)
- BΘ(x)
- CΘ(x log2x)
- DΘ(x2)
Correct answer: D
Explanation
In the worst case quick sort picks a bad pivot every time and splits the array into n–1 and 0 elements, so the running time is Θ(n²). Discussion 0
Nobody has replied yet. Start the discussion!