PA of Algorithms Q44

0. Let T(n) be a function defined by the recurrence T(n) = 2T(n/2) + √n for n ≥ 2 and T(1) = 1. Which of the following statements is TRUE?

  • Option : C
  • Explanation :
    T(n) = 2T(n/2) + √n
    Apply master’s method
    nlog22 ⇒ n > √n
    So T(n) = Θ(n)
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 *