I want to know the time complixity in details for this code
Code:
public class
{
for (int i = 0; i < limit; i++)
{
d = fun(i) ; // call to function
m=((i >> d) + 1) >> 1;
d3=2 - (num1+ d)%2;
s = (m*d3)%3;
int dest = (m + d3)%3;
cout<<d3<<d2
}
static int fun(int i)
{
int g, x = i+1;
for (g = 0; x%2 == 0; g++) x /= 2;
return g;
}
} // end of class
Comment