What is the complexity of the following code?

int count = 0;

int i, j, k;

for (i = m; i >= 0  ; i /= 3)

{

for(j = 1; j <= n ; j++)

{

int x = k;

while(x--)

{

count++;

}

}

}       

1
O(n.log m)
2
O(k.n.log m)
3
O(k.n.logn)
4
O(k.n.m1/3)

Sponsored

hivanix.in

Visit

This quiz is brought to you by hivanix.in

🌐 Web App Development

Quick Navigation