retagged by
462 views

1 Answer

0 votes
0 votes
1 to n der are logn terms.
apply GP sum formula = a(r^b-1)/(r-1) //b is no of terms in GP
here a = 1, b = logn, r = 2
= 1*(2^(logn) -1)/(2-1)
= n-1     // 2^logn = n
= O(n)

Related questions

0 votes
0 votes
0 answers
2
aka 53 asked Nov 25, 2017
341 views
I wanted to know how θ is derived for a problem. Can we write it directly Example n^4 + n^3+ n^2 Here worst case will be n^4 since it is the term with highest power(wors...
3 votes
3 votes
2 answers
3
Manu Thakur asked Aug 15, 2017
867 views
f(n) = $n*2^{n}$g(n) = $e^n$What is the relation b/w the asymptotic time complexities of f(n) and g(n)?
1 votes
1 votes
1 answer
4
Çșȇ ʛấẗẻ asked Jan 3, 2017
206 views
Assume we are given that f(n) = Οg(n), then which of the following can be stated true2f(n) = Ο(2g(n)) log f(n) = Ο(log (g(n))g(n) ≠ Ω f(n)None of these