8/7/22, 1:30 AM
Self-Quiz Unit 2: Attempt review
Dashboard / My courses / CS 3303-01 - AY2022-T5 / 23 June - 29 June /_Self-Quiz Unit 2
Started on Wednesday, 29 June 2022, 6:10 AM State Finished Completed on Wednesday, 29 June 2022, 6:11 AM Time taken 1 min 4 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 Algorithms running time is represented by:
Select one: O a. Big Oh (0) 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 eguatior
The correct answer is: The growth rate demonstrated in the algorithm running time equation
A
https://my.uopeople.edu/mod/quiz/review.php?attempt=7976489&cmid=298982
1/8
8/7/22, 1:30 AM
Self-Quiz Unit 2: Attempt review
Question 3 Correct Mark 1.00 out of 1.00
True/False: Big Theta (O) indicates that the Upper and Lower bounds of an algorithm are the same.
Select one: O True v
OFalse
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[il);
Option 1.
(u)0 Option 2. 0(2)
Option 3.
O(n log n) Option 4. O(n2)
Select one: O a. Option1 O b. Option 2
O c. Option 3 O d. Option 4
The correct answer is: Option 1
https://my.uopeople.edu/mod/quiz/review.php?attempt=7976489&cmid=298982
2/8
8/7/22, 1:30 AM
Self-Quiz Unit 2: Attempt review
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 (int i = 1; i<= n; i *= 2){ for (int j = 0; j<n;j++){ count++;
}
Option 1.
0(1)
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
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 Iogarithms in Computer Science is 2.)
The correct answer is: Option 3
https//my.uopeople.edu/mod/quiz/review.php?attempt=7976489&cmid=298