title: Time complexity of nested for-loop
body: <p>I need to calculate the time complexity of the following code:</p>
  
  <pre><code>for (i = 1; i &lt;= n; i++)
  {
    for(j = 1; j &lt;= i; j++)
    {
     // Some code
    }
  }
  </code></pre>
  
  <p>Is it <em>O(n^2)</em>?</p>