title: Time complexity of nested for loop inside while loop
body: <p>If there is a nested for loop inside while loop like this:</p>
  
  <pre><code>while(condition)
     for(i=0; i&lt;size; i++)
  </code></pre>
  
  <p>the size in the for loop is increasing every time the for loop is being executed, starting at 1,2,...,n-1
  and the while loop runs n-1 times.</p>
  
  <p>That means that the time complexity is O(n^3)?</p>