(A) T(n) =
(B) T(n) =
(C) T(n) =
(D) T(n) =
(A) A (B) B (C) C (D) D
Answer:(B)
Explanation: This question can be solved by first change of variable and then Master Method.
Let n = 2^m T(2^m) = T(2^(m/2)) + 1 Let T(2^m) = S(m) S(m) = 2S(m/2) + 1Above expression is a binary tree traversal recursion whose time complexity is
S(m) =Now, let us go back to the original recursive function T(n)(m) = (logn) /* Since n = 2^m */
T(n) = T(2^m) = S(m) =(Logn)
Quiz of this Question