I need to calculate the time complexity of the following code:
for (i = 1; i <= n; i++) { for(j = 1; j <= i; j++) { // Some code } }
Is it O(n^2)?