What is the running time of the following piece of code ?

for(inti=0;i<n*n;i++)
     sum=sum-i;


Difficulty level
This exercise is mostly suitable for students
n*n

Back to the list of exercises
Looking for a more challenging exercise, try this one !!
Asymptotic Analysis 7