Dashboard / My courses I g CS 3303-01 - AY2022-T5 / 23 June - 29 June / Self-Quiz Unit 2
Started on Thursday, 23 June 2022, 6:55 PM State Finished Completed on Thursday, 23 June 2022, 6:59 PM Time taken 3 mins 38 secs Grade 10.00 out of 10.00 (100%)
Question 1 Correct
Mark 1.00 out of 1.00
The upper bound for the growth of the AIgorithms running time is represented by:
Select one: O a. Big Oh(O) O b. Big Omega() O c. Big Theta (0) O d. Exponential growth
The correct answer is: Big Oh (O)
Question 2 Correct Mark 1.00 out of 1.00
Asymptotic Algorithm Analysis is primarily concerned with
Select one: O a. The size of the constant in the algorithm running time equation O b. The speed of the computing running the algorithm O c. The speed of the compiler O d. The growth rate demonstrated in the algorithm running time equation
The correct answer is: The growth rate demonstrated in the algorithm running time equation
Question 3 Correct Mark 1.00 out of 1.00
True/False: Big Theta () indicates that the Upper and Lower bounds of an algorithm are the same.
Select one:
O True v
O False
The correct answer is'True'
Question 4 Correct Mark 1.00 out of 1.00
For the following code fragment, select the option that represents the most appropriate asymptotic analysis: for (int i = 0; i < a.length; i++) { System.out.printIn(a[i]);
Option 1.
O(n) Option 2. 0(2)
Option 3.
O(n log n) Option 4. O(n2)
Select one: O a. Option 1 O b. Option 2 O c. Option 3 O d. Option 4
The correct answer is: Option 1
Question 5 Correct Mark 1.00 out of 1.00
For the following code fragment, select the option that represents the most appropriate asymptotic analysis: for (inti = 1; i<= n; i*= 2){ for (int j= o; j< n; j++){ count++;
Option 1.
O(1)
Option 2.
0(2n) Option 3. O(n log n) Option 4. O(n2)
Select one: O a. Option 1 O b. Option 2 O c. Option 3 O d. Option 4
Explanation: Here the outer loop is done log n times and the inner loop is done n times, so T(n) = n log n. (Note that the default base for logarithms in Computer Science is 2.)
The correct answer is:Optio