I have an algorithm exam.. and am a bit not great in the loops time complexity :s I just started to get the basics of it..
I have this while loop
i=2
while (i<n)
{
i=i*i
x=x+1
}
I believe that the solution must be like:
(i) will run from 2 to 2k where k = 2i
every time it execute the statement 1 time..
so 1+1+1+.. , this means 1*2k
and from here I can't continue..
the second question guys.. please recommend a site or sth that I can practice some more of these.. searched but didn't find :s