title: Time complexity for a nested for loop
body: <p>Given the following nested for loop:</p>
  <pre><code>for (int i=n; i&gt;1; i=i/2):
      for (int j=i; j&lt;n; j=j*2)
          # O(1) expression
  </code></pre>
  <p>What would the time complexity of the entire loop be? My answer is O(log(n)*log(n)) but I'm not sure if it is right.</p>