What is the complexity of T(n)=T(n/2) + 1 in recursive manner?
Answers
Answered by
4
Answer :
T(n) = 2T(n/2) + 1
T(n-1) = 4T(n-1/4) + 3
T(n-2) = 8T(n-2/8) + 7
T(n) = 2^n+1 T (n/2^n+1) + (2^n+1 - 1)
Pardon,if wrong.
Similar questions