tjn92
asked on
Can someone help me with Big O?
Will someone that is good with Big-O notation help me find the Big-O for this program fragment in C?
sum = 0;
for(i=1; i<n; i++)
for(j=1; j<i*i; j++)
if(j%i == 0)
for(k=0; k<j; k++)
sum++;
sum = 0;
for(i=1; i<n; i++)
for(j=1; j<i*i; j++)
if(j%i == 0)
for(k=0; k<j; k++)
sum++;
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
And it's not allowed to ask a question twice for more than 500 points.
There are enough hints in the initial thread: https://www.experts-exchange.com/questions/21816779/Algorithm-analysis.html