title: How do I find the order of growth for this function?
body: <p>Here's the function:</p>
  
  <pre><code>int sum = 0;
  for (int n = N; n &gt; 0; n /= 2)
      for (int i = 0; i &lt; n; i++)
          sum++;
  </code></pre>
  
  <p>The order of growth they gave was O(n). So how did they get to that answer?</p>