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
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
Get step-by-step solutions from verified subject matter experts
