Engineering
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 =

answer
Answers: 3

Other questions on the subject: Engineering

image
Engineering, 04.07.2019 03:10, lauriepdx17
What precautions should you take to prevent injuries when dealing with heavy loads?
Answers: 1
image
Engineering, 04.07.2019 18:10, viicborella
Steel is coated with a thin layer of ceramic to protect against corrosion. what do you expect to happen to the coating when the temperature of the steel is increased significantly? explain.
Answers: 1
image
Engineering, 04.07.2019 18:10, sarahgrindstaff123
Afluid flows with a velocity field given by v=(x/t)i.. determine the local and convective accelerations when x=3 and t=1.
Answers: 2
image
Engineering, 04.07.2019 18:10, winterblanco
The higher the astm grain-size number, the coarser the grain is. a)-true b)-false
Answers: 3
Do you know the correct answer?
7) For this function, determine an equation for the worst-case computing time T(n) (expressed as a f...

Questions in other subjects:

Konu
Mathematics, 17.12.2019 14:31
Konu
Mathematics, 17.12.2019 14:31