You have an array of \(n\) elements. Suppose you implement quicksort by always…

PYQ GATE 2014

You have an array of nn elements. Suppose you implement quicksort by always choosing the central element of the array as the pivot. Then the tightest upper bound for the worst case performance is

  1. A.

    O(n2)O (n^2)

  2. B.

    O(nlog⁡n)O(n \log n)

  3. C.

    θ(n log n)\theta (n \ log \ n)

  4. D.

    O(n3)O (n^3)

Attempted by 865 students.

Sign up free to check your answer

Sign up free

Explore the full course: Algorithms

Loading lesson…