title: What is the Big-O of a nested loop, where number of iterations in the inner loop is determined by the current iteration of the outer loop?
body: <p>What is the Big-O time complexity of the following nested loops:</p>
  <pre class="lang-cpp prettyprint-override"><code>for (int i = 0; i &lt; N; i++) {
      for (int j = i + 1; j &lt; N; j++) {
          System.out.println(&quot;i = &quot; + i + &quot; j = &quot; + j);
      }
  }
  </code></pre>
  <p>Would it be <em>O(N^2)</em> still?</p>