The GATE Grind

GATE 2008 CS – Question 43

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

Quicksort has a pivot routine splitting every list so each side contains at least one-fifth of the elements. If T(n) counts sorting comparisons, then

  1. $T(n)\le2T(n/5)+n$
  2. $T(n)\le T(n/5)+T(4n/5)+n$
  3. $T(n)\le2T(4n/5)+n$
  4. $T(n)\le2T(n/2)+n$

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: (B) $T(n)\le T(n/5)+T(4n/5)+n$; (C) $T(n)\le2T(4n/5)+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 →