Skip to content
Related Articles
Open in App
Not now

Related Articles

GATE | GATE-CS-2001 | Question 14

Improve Article
Save Article
  • Last Updated : 22 Nov, 2021
Improve Article
Save Article

Randomized quicksort is an extension of quicksort where the pivot is chosen randomly. What is the worst case complexity of sorting n numbers using randomized quicksort?
(A) O(n)
(B) O(n Log n)
(C) O(n2)
(D) O(n!)


Answer: (C)

Explanation: If all elements of the given array are same then that is the worst case for the randomised quicksort. And time complexity of worst case of quicksort is O(n²) that is proven already.

So, option (C) is correct.

Quiz of this Question

My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!