Computer Science EngineeringHardISRO SC (CS)

Using the Master theorem (extended form), the solution of T(n) = 2T(n/4) + n is:

  1. A. Theta(n)
  2. B. Theta(n log n)
  3. C. Theta(n log^2 n)
  4. D. Theta(n^(log_4 2))

Correct answer: A. Theta(n)

f(n) = n^1 dominates n^0.5 and the regularity condition holds, so T(n) = Theta(f(n)) = Theta(n). Here a = 2, b = 4, log_b a = 0.5.

More Algorithms, Data Structures & Programming (ISRO CS) questions

Exams that ask this topic