Do the two algorithms have the same theta characterization of Θ(n^2)?
int sum = 0;
for (int i = 0; i < n; i++ )
for (int j = 0; j < n * n; j++ )
sum++;
int sum = 0;
for ( int i = 0; i < n; i++)
for ( int j = 0; j < i; j++)
sum++;
If not then does this mean that this characterization is not Θ(n^3)?
int sum = 0;
for ( int i = 0; i < n; i++)
for ( int j = 0; j < i * i; j++ )
for ( int k = 0; k < j; k++ )
sum++;