title: What's the Big-Oh for nested loops i=0..n-2, j=i+1..n-1?
body: <p>Given the following code:</p>
  
  <pre><code>for (int i = 0; i &lt; n-1; ++i)
  {
      for (int j = i+1; j &lt; n; ++j)
      {
          // Do work.
      }
  }
  </code></pre>
  
  <p>What is the Big-Oh value for it (over <code>n</code>)? I'm thinking it's O(N^2) but I'm not sure.</p>
  
  <p>I did find a similar question here: <a href="https://stackoverflow.com/questions/16743395/complexity-for-nested-loops">complexity for nested loops</a></p>
  
  <p>but it's not quite the same I think.</p>