Question: Please provide the Time Complexity Equation (not the Big O notation) for the following java code: for( i=1 ; i for(j=n; j >= 1 ;

Please provide the Time Complexity Equation (not the Big O notation) for the following java code:

for( i=1 ; i

for(j=n; j >= 1 ; j/=2)

{

x += 5;

y = d * 5;

}

The part that is confusing me is the second for loop.

I know how to get the Big O notation from the Time Complexity equation, but not sure how to get the Time Complexity equation with all the for loops (with c1+c2+n^2 and such). I think the Big O answer is Please provide the Time Complexity Equation (not the Big O notation) for but I am not sure, but still - that's not really what I am looking for. Needing to figure out the time complexity first. Thanks!

zulo n

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!