GATE Computer ScienceHardGATE CS (PYQ pattern)

T(n) = 4T(n/2) + n² log₂ n. Which is the tight solution?

  1. A. Θ(n² log n)
  2. B. Θ(n² log² n)
  3. C. Θ(n² )
  4. D. Θ(n³)

Correct answer: B. Θ(n² log² n)

f(n) = n^(log_b a)·log n, so the extended case gives Θ(n² log² n): each of the log n levels costs n²·(log n − i), summing to Θ(n² log² n).

More Algorithms questions

Exams that ask this topic