[Solved]-Question 1 1 Point Saved Given Following Table Timing Results Problem Size N Run Time Tn A Q37175699

![What is the order of growth with respect to parameter n for the following function? public static int m(int n, int[] a )( int](https://media.cheggcdn.com/media%2F2c9%2F2c9a8412-dd2b-40f0-8233-2b6ec3c933e0%2Fimage.png)









Question 1 (1 point) Saved Given the following table of timing results for problem size N and run time TN and the assumption that TN- aNb, what is the estimate for b? 31 258 65123 4 16 2 3 Activate O none of the above What is the order of growth with respect to parameter n for the following function? public static int m(int n, int[] a )( int count e; for(int i-0; i n; ++i)( count++ İnsaved ++)){ for(int je, if (alj] 2) count++ j< n; return count; n2 n3 n log n Act Question 3 (1 point) Insertion sort finds the smallest value in the unsorted range, removes it, and places it at the end of the sorted range True False Question 4 (1 point) Given the following table of timing results for problem size N and run time TN and the assumption that TN-aNb, what is the estimate for b? TN 0.5 1000 2000 4000 8000 31 248 2 3 Act Go t non of the above What is the order of growth with respect to parameter n for the following function? public static int q(int n, int[i a) int count-0; for int i-0; i n +i)X n; for(int j< for(int k j+1; k< n; ++k) j#1+1 ; ++]){ count++i for(int mj+1; m n: +m) if (ali] -a(51 -am) count+t return count n3 log n Activ 4 Question 6 (1 point) You can’t afford to use a quadratic algorithm (or worse) to address increasing problem sizes. True False Question 7 (1 point) Last In Last Out (LILO) is the processing approach of a Stack True False Question 8 (1 point) What is the order of growth with respect to parameter n for the following function? public static int foo(int n) int count-0; for(int i-n; i> e; i/-2)( count++i return count; log n constant 2 What is the order of growth with respect to parameter n for the following function? public static int boo(int n )( return 1; return 2*boo(n-1) 3*boo (n-2); 2 n log n Question 10 (1 point) Insertion sort has n log n order of growth for run time for array size n. Activa True False Question 11 (1 point) What does the following recursive function return when called with “OSU” as the Unsaved) Parameter? public static String mystery (String s) ( int n s, length(); if (n< 1) return s; String a s.substring(e,n/2); string b s.substring(n/2,n) return mystery(b)+mystery(a): UO oSu USO Ac Go 1 OU Question 12 (1 point) What is the value of x at the end of the code below? else x = -2; Your Answer: Answer on 9 Unsaved Question 13 (1 point) In an if-else chain, if the first test is true, then the computer will execute the first statement and check each other test individually before ending True False Question 14 (1 point) What is the value of the expression (2+3 “fun”)? 23fun 5fun error Question 15 (1 point) Suppose you want to print an grid of numbers using the code below for (int r-0; r<5; r++) for (int c-0; c:4; c++) System.out.print(r+c)+””) System.out.println0: What is the top left number that would be printed? Your Answer Answer Show transcribed image text Question 1 (1 point) Saved Given the following table of timing results for problem size N and run time TN and the assumption that TN- aNb, what is the estimate for b? 31 258 65123 4 16 2 3 Activate O none of the above
What is the order of growth with respect to parameter n for the following function? public static int m(int n, int[] a )( int count e; for(int i-0; i n; ++i)( count++ İnsaved ++)){ for(int je, if (alj] 2) count++ j
Expert Answer
Answer to Question 1 (1 point) Saved Given the following table of timing results for problem size N and run time TN and the assump… . . .
OR

