The GATE Grind

GATE 2009 CS – Question 39

Algorithms · Divide-and-Conquer · 2 marks · Multiple choice

Quicksort chooses the (n/4)th smallest element as pivot for n elements using an O(n)-time selection algorithm. What is its worst-case time complexity?

  1. $\Theta(n)$
  2. $\Theta(n\log n)$
  3. $\Theta(n^2)$
  4. $\Theta(n^2\log n)$

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: (B) $\Theta(n\log n)$

Explanation

We are sorry we couldn't write detailed soluition for this, we are working on it!, please consider asking your own AI, its just 2-3 clicks with very minimum effort

More Divide-and-Conquer questions

All Divide-and-Conquer questions →