Home > OS >  big O time complexity recurrence relation
big O time complexity recurrence relation

Time:06-25

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

  • Related