Question discussion

The solution of the recurrence T(n) = T(√n) + 1 is

1578Medium DSSSB TGT Computer Science 0 replies 1 views
0

The solution of the recurrence T(n) = T(√n) + 1 is

  • AΘ(log n)
  • BΘ(log log n)
  • CΘ(√n)
  • DΘ(n)
Correct answer: B

Explanation

Putting n = 2^m gives S(m) = S(m/2) + 1, whose solution is Θ(log m) = Θ(log log n).

Discussion 0

Nobody has replied yet. Start the discussion!