PA of Algorithms Q107

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

  • Option : B
  • Explanation :
    Recurrance relation is
    T (n) = T (n/4) + T (3n/4) + n
    On solving using tree’s method.
    T(n) = O(nlogn)
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *