Header Ads Widget

Find the time complexity

Find the time complexity

Find the time complexity of following pseudo code:

int func(int n)
    count=0
    for (lv=n; lv>0; lv/=2)
        inner_lv=0
        while(inner_lv < lv)
            inner_lv++
            count+=1

    return count
Options
This problem has only one correct answer

Ans:- 1

Recommended Post :-

HCL Coding Questions:-

Capgemini Coding Questions:-

Companies interview:-

Full C course:-    

Key points:-

Cracking the coding interview:-

 Array and string:-

Tree and graph:-

Hackerearth Problems:-

Hackerrank Problems:-

Data structure:-

 MCQs:-

Post a Comment

0 Comments