Question: 1. (25 points) Assume each expression listed below represents the execution time of a program. Express the order of magnitude for each time using big

 1. (25 points) Assume each expression listed below represents the executiontime of a program. Express the order of magnitude for each time

1. (25 points) Assume each expression listed below represents the execution time of a program. Express the order of magnitude for each time using big O notation. a. T(n) = n.4 100n . 1082 n + 5000 b. T(n) = 2n + n99 + 7 n2-1 82 n+1 d. T(n) 1 2 +4+2-1 2. (75 points+5 extra credit) For each of the code segments below, determine an equation for the worst-case computing time T(n) (expressed as a function of n, i.e. 2n 4) and the order of magnitude (expressed using big O notation, i.e. O(n). a. // Calculate mean sum = 0; cin x; while (x != -999) sum X mean = sum / n; 2. (continued) (75 points) For each of the code segments below, determine an equation for the worst-case computing time T(n) (expressed as a function of n, i.e. 2n + 4) and the order of magnitude (expressed using big O notation, ie. O(n)) b. // Matrix addition for (int i- 0; i x[j + 1]) x[j+ 1]temp; e. while (n >- 1) f. (extra credit-5 points) for (int 1-1; i

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!