I understand that the following nested for-loop:
for(i=0; i<n/2; i++)
for(j=0; j<n/2; j++)
print(j)
has the runtime complexity of
which has a simplifed complexity of
but what is the resulting complexity of making j bound to i/2 in the inner loop? For instance:
for(i=0; i<n/2; i++)
for(j=0; j<i/2; j++)
print(j)
Would this be
?