GATE Computer ScienceVery hardGATE CS (PYQ pattern)

Solve T(n) = 2T(√n) + log₂ n for large n. Which is the tight bound?

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

Correct answer: A. Θ(log n · log log n)

Put m = log n and S(m) = T(2^m): S(m) = 2S(m/2) + m, which is the merge-sort recurrence, so S(m) = Θ(m log m) and T(n) = Θ(log n · log log n).

More Algorithms questions

Exams that ask this topic