title: Why is code like i=i*2 considered O(logN) when in a loop?
body: <p>Why because of the i=i*2 is the runtime of the loop below considered O(logN)?</p>
  
  <pre><code>for (int i = 1; i &lt;= N;) {
    code with O(1);
    i = i * 2;
  }
  </code></pre>