title: Python Time Complexity (run-time)
body: <pre><code>def f2(L):
      sum = 0
      i = 1
      while i &lt; len(L):
          sum = sum + L[i]
          i = i * 2
      return sum
  </code></pre>
  
  <p>Let n be the size of the list L passed to this function. Which of the following most accurately describes how the runtime of this function grow as n grows?</p>
  
  <p>(a) It grows linearly, like n does. 
  (b) It grows quadratically, like n^2 does. </p>
  
  <p>(c) It grows less than linearly. 
  (d) It grows more than quadratically.</p>
  
  <p>I don't understand how you figure out the relationship between the runtime of the function and the growth of n. Can someone please explain this to me?</p>