PA of Algorithms Q110

0. Which one of the following is the recurrence equation for the worst case time complexity of the Quicksort algorithm for sorting n(≥ 2) numbers? In the recurrence equations given in the options below, c is a constant.

  • Option : B
  • Explanation :
    The recurrence equation is
    T(n) = T(n – 1) + T(1) + cn
    In quick sort, worst case divide the list into two list with 1 and (n – 1) elements each time.
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 *