Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

analysis of the running time big-oh

Ahmed NourAhmed Nour Member Posts: 1

analysis of the running time big-oh for three programs first one:

sum=0;n=math.pow(2,k);
for(j=0;j<n;j++)
for(i=1;i<n;i=2*i)
sum++;

second one:

sum=0
for(i=0;i<n;i++)
sum++;
for(j=0;j<n;j++)
sum++;

third one:

sum=0;
for(i=0;i<n;i+=5)
for(j=0;j<i;j++)
for(k=0;k<j;k++)
sum++;
Tagged:
Sign In or Register to comment.