GATE Computer ScienceVery hardGATE CSE · UGC NET

The recurrence T(n) = 2T(n/2) + n/log₂ n (with T(1) = 1) has the solution

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

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

Unrolling gives Σ n/(log n − i) over levels = n·H(log n) = Θ(n log log n); the Master theorem does not apply because the driving term is not polynomially comparable.

More Algorithms questions

Exams that ask this topic