title: Big O Notation for Nested Loop
body: <p>I am trying to find time complexity for this Code. </p>
  
  <pre><code>for (int i = 0; i &lt;= n - 1; i++)
    for (int j = i + 1; j &lt;= n - 1; j++)
      for (int k = j + 1; k &lt;= n - 1; k++)
  </code></pre>
  
  <p>My Attempt: 
  We can write this loop in the form:</p>
  
  <pre><code>for (int i = 1; i &lt;= n; i++)
    for (int j = 1; j &lt;= n; j++)
      for (int k = 1; k &lt;= n; k++)
  </code></pre>
  
  <p>Now Big Oh of this loop is O(n^5). Am I correct or doing some mistake?</p>