title: Difference of complexity between double nested for loops? (Java)
body: <p>What's the difference in terms of performance and complexity between these two nested for loops?</p>
  
  <pre><code>for(int i = 0; i &lt; l.length; i++) {
      for(int j = 0; j &lt;= i; j++) {
          //do something
      }
  }
  </code></pre>
  
  <p>and :</p>
  
  <pre><code>for(int i = 0; i &lt; l.length; i++) {
      for(int j = 0; j &lt; l.length; j++) {
          //do something
      }
  }
  </code></pre>