Can someone please explain how the time complexity of this algorithm is O(n) using recurrence relation.
def exercise2(N):
count = 0
i = N
while ( i > 0 ):
for j in range(0,i):
count = count 1
i = i//2
CodePudding user response:
For positive