Computer Science EngineeringHardISRO SC (CS)

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

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

Correct answer: D. Theta(n^2)

f(n) = n^1 log^2 n is polynomially smaller than n^(log_2 4) = n^2, so case 1 gives Theta(n^2). Here a = 4, b = 2, log_b a = 2.

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

Exams that ask this topic