Computer Science EngineeringVery hard

The recurrence T(n) = T(sqrt(n)) + 1 has the solution

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

Correct answer: A. Theta(log log n)

Taking square roots repeatedly reaches a constant after log2 log2 n steps.

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

Exams that ask this topic