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, 04.07.2019 16:10
An electrical motor raises a 50kg load at a construct velencity .calculate the power of the motor, if it takes 40sec to raise the load through a height of 24m(take g =9.8n/g)
Answers: 2
question
Engineering, 04.07.2019 18:20
Derive the correction factor formula for conical nozzle i=-(1+ cosa) and calculate the nozzle angle correction factor for a nozzle whose divergence hal-fangle is 13 (hint: assume that all the mass flow originates at the apex of the cone.
Answers: 3
question
Engineering, 04.07.2019 19:10
What is the main objective of using reheat rankine cycle?
Answers: 3
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, 07.01.2021 21:40
question
Mathematics, 07.01.2021 21:40
question
Advanced Placement (AP), 07.01.2021 21:40
question
Mathematics, 07.01.2021 21:40
question
History, 07.01.2021 21:40
question
Biology, 07.01.2021 21:40
question
Mathematics, 07.01.2021 21:40
Questions on the website: 13722359