269 views

1 Answer

Best answer
2 votes
2 votes

use master theorem we will get answer as 

nlog21    

  = n= 1 (i.e constant)

so time complexity will be ⊜(n)


Or,

T(n) = n + n/2 + n/4 + n/8 + ..... + 1.

       =2n

       = O(n)

selected by

Related questions

3 votes
3 votes
1 answer
1
sumit_kumar asked Jun 25, 2017
3,150 views
what is time comlexity procedure for following recursive equation by substitution method:T(n)= T(n-1)+T(n-2) , if n>=2 =1 , if n=1; =0 , if n=0.
2 votes
2 votes
1 answer
2
2 votes
2 votes
1 answer
3
14 votes
14 votes
5 answers
4
Jonathan Decosta asked Jun 10, 2015
47,297 views
Please tell me the complete steps how to solve this problem.$ T(n) = T ( \sqrt n )+ 1$