title: While loop Time complexity
body: <p>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..</p>
  
  <p>I have this while loop</p>
  
  <pre><code>i=2
  while (i&lt;n)
  {
     i=i*i
     x=x+1
  }
  </code></pre>
  
  <p>I believe that the solution must be like:<br>
  (i) will run from 2 to 2<sup>k</sup> where k = 2<sup>i</sup>
  <br>
  every time it execute the statement 1 time..</p>
  
  <p>so 1+1+1+.. , this means 1*2<sup>k</sup></p>
  
  <p>and from here I can't continue..</p>
  
  <p>the second question guys.. please recommend a site or sth that I can practice some more of these.. searched but didn't find :s</p>