in Combinatory edited by
1,417 views
0 votes
0 votes

Let $T(n) = T(n-1) + \frac{1}{n} , T(1) = 1 ;$ then $T(n) = ? $

  1. $O(n^{2})$
  2. $O(logn)$
  3. $O(nlogn)$
  4. $O(n^{2}logn)$
in Combinatory edited by
1.4k views

3 Comments

If we use H.P. sum formula it will come as log(something). So by intuitively we can say option B is correct

0
0
yeah thanks
0
0
O(logn)
0
0

2 Answers

2 votes
2 votes

......

this is the way to dealing with such type of question 

 

 

 

 

 

 

4 Comments

O(logn) ....And I don't think that any one can explain more for this ...This is more than enough by the way wich part have you facing problem ????
0
0

Ok, your method is good, but

How you take the condition

where $n>1$ given in the question, you take $k =n-1$,right??

if $n>=1$ given the question, what we take $k =?$

if $n>=0$ given the question, what we take $k =?$

 

0
0
I also have same doubt . Unable to explain sorry bro ..!
0
0
0 votes
0 votes
T(n)=1/1+1/2+1/3+1/4+.......+1/n

T(n)= O(logn)

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true