In quick sort, for sorting n elements, the (n/4)th smallest element is…

PYQ GATE 2009

In quick sort, for sorting n elements, the (n/4)th smallest element is selected as a pivot using an O(n) time algorithm. What is the worst-case time complexity of the quick sort?

  1. A.

    θ(n)

  2. B.

    θ(nlogn)

  3. C.

    θ(n2)

  4. D.

    θ(n2 log n)

Attempted by 650 students.

Sign up free to check your answer

Sign up free

Explore the full course: Algorithms

Loading lesson…