Hi! I want to know, how to calculate running time complexity of a given code or algorithm. some one please help me. code is given below.
x = 0;
for (a=1;a<=n;a=a*9)
{
for (b=1; b<=3n; b++)
{
for(c=0;c<n; c=c+5)
{
x++;
}
}
}
I think,
there is for the outer loop, the inner statements run log3n and the inner most loop will run n/5 times. but I am confused. about the b loop. and due to this I cannot understand, how to do it.