subject
Engineering, 08.04.2020 04:25 nickthequick

7) For this function, 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)). To help you show your work, each line is numbered. Write the number of times each line executes in the appropriate blank, then list T(n) and the order of magnitude in the appropriate blanks. Use the space in which you enter T(n) to briefly explain your answer, if necessary. For example, if one or more lines are skipped in the worst case, explain which lines are skipped (or, alternatively, which lines are used to calculate T(n)). void f(double arr[], int n) { int i, j; 1 for (i = 0; i < 10; i++) { for (j = 0; j < n; j = j * 2) { if (arr[j] = i) 4 cout << arr[j]; AWN Line 1: Line 2: Line 3: Line 4: T(n) = Order of magnitude =

ansver
Answers: 3

Another question on Engineering

question
Engineering, 03.07.2019 14:10
Amass of m 1.5 kg of steam is contained in a closed rigid container. initially the pressure and temperature of the steam are: p 1.5 mpa and t 240°c (superheated state), respectively. then the temperature drops to t2= 100°c as the result of heat transfer to the surroundings. determine: a) quality of the steam at the end of the process, b) heat transfer with the surroundings. for: p1.5 mpa and t 240°c: enthalpy of superheated vapour is 2900 kj/kg, specific volume of superheated vapour is 0. 1483 m/kg, while for t 100°c: enthalpy of saturated liquid water is 419kj/kg, specific volume of saturated liquid water is 0.001043m/kg, enthalpy of saturated vapour is 2676 kj/kg, specific volume of saturated vapour is 1.672 m/kg and pressure is 0.1 mpa.
Answers: 3
question
Engineering, 03.07.2019 15:10
Apiston-cylinder with a volume of 0.25 m3 holds 1 kg of air (r 0.287 k/kgk) at a temperature of 100 c. heat transfer to the cylinder causes an isothermal expansion of the piston until the volume triples. how much heat is added to the piston-cylinder?
Answers: 3
question
Engineering, 04.07.2019 18:10
What difference(s) did you notice using a pneumatic circuit over hydraulic circuit.explain why the pneumatic piston stumbles when it hits an obstacle.
Answers: 2
question
Engineering, 04.07.2019 18:10
The drive force for diffusion is 7 fick's first law can be used to solve the non-steady state diffusion. a)-true b)-false
Answers: 1
You know the right answer?
7) For this function, determine an equation for the worst-case computing time T(n) (expressed as a f...
Questions
question
Mathematics, 13.11.2020 23:40
question
Mathematics, 13.11.2020 23:40