int a = 0;
for (int i = 0; i < n*n; ++i) {
for (int j = 0; j <= i; ++j) {
a += j;
}
}
Could someone help prove to me that this is function is $O(N^4)$.
I remember doing this problem a while back, but now I do not see it.
I understand that the outer loop is $O(N^2)$ but I am unsure of how this would cause the inner loop to be $O(N^2)$ as well