Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

CSE 2321 Jones Spring 2017 homework 9 iterative run-time analysis 50 pts. due da

ID: 3803690 • Letter: C

Question

CSE 2321 Jones Spring 2017 homework 9 iterative run-time analysis 50 pts. due date Fri., Mar. 24 Provide both best-case "omega" and worst-case "big oh" run-time analyses for each of the following. When a value of "n' is used, it is the size of the input. Variables which are not explicitly derived from n should be considered independent values. Values input for n, min and max are always non-negative itegers. You need only list a value for 2(n) when it differs from O(n). "exit loop should be taken to terminate only the inner-most loop.

Explanation / Answer

Please find below the num iterations:

Best(O) Worst (Omega) Line

1 1 cin...

1 N-1 for...

1 N-1 if...

- N-1 salad...

n-max 1 for...

min-n n^2 for...

lg n n^2*lgn for...

n n^3 lgn salad...