GATE Computer ScienceHardGATE CS (PYQ pattern)

Consider T(n) = 2T(n/2) + n/log₂²n for powers of 2, T(1) = 1. Which is the tight asymptotic bound?

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

Correct answer: D. Θ(n)

Level i costs n/(log n − i)², so the total is n·Σ_{j=1}^{log n} 1/j² ≤ n·π²/6 = O(n); the leaf level already gives Ω(n). The 1/log n case would give n log log n, but the square makes the series converge.

More Algorithms questions

Exams that ask this topic