Question: Determine the big O running time of the method myMethod(int n) by counting the approximate number of operations it performs. Show all details of

Determine the big O running time of the method myMethod(int n) by counting the approximate number of operations it performs. Show all details of your answer. Static void doIt (int n) { int i int j + (2 n) loop while (j > 0) { i n loop while (i >= 1) { i+i/2 jj-1 } } } Static int myMethod (int n) { sum + 0 for i 1 to n{ sum = sum + doIt(i) return 1 } }
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
