CS 3303 || A+ Verified Solutions.
A solution is said to be efficient if it: correct answers It solves the problem within the required
resource constraints.
An ADT is: correct answers the realization of a data type as a software component.
The implementation of a data type as a data structure is the physical form of an ADT. True or
false? correct answers True
Which of the following is NOT one of the design patterns mentioned in our text? Flyweight?
Visitor? Composite? Synergy? correct answers Synergy
If A={1, 2, 3, 4} and B={4, 5, 6}, find A∪ B .
A: { x | x is all positive integers }
B: {1,2,3,4,5,6}
C: {1,2,3,4,4,5,6}
D: {4} correct answers B: {1, 2, 3, 4, 5, 6}
According to the properties of logarithms, log(nm) =
A: a. log n - log m
B: n log n
C: log n + log m
D: log(n^m) correct answers C: log n + logm
Recursion is when an algorithm uses a series of loop structures to repeat an operation until the
answer has been computed. True or false? correct answers False
Which of the following is not a mathematical proof technique?
A: proof by mathematical induction
B: proof by contradiction
C. Direct proof
D. proof by consensus correct answers D. proof by consensus
Which of the following is not a characteristic of an algorithm?
A: It must be correct.
B: It must be composed of concrete steps.
C: It can have no ambiguity.
D: It must be composed of an infinite number of steps. correct answers D: It must be composed
of an infinite number of steps.
The upper bound for the growth of the Algorithms running time is represented by:
, A: Big Oh (O)
B: Big Omega(Ω)
C: Big Theta(Θ)
D: Exponential Growth correct answers A: Big Oh(O)
Asymptotic Algorithm Analysis is primarily concerned with? correct answers The growth rate
demonstrated in the algorithm running time equation
True/False: Big Theta (Θ) indicates that the Upper and Lower bounds of an algorithm are the
same. correct answers True
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.println(a[i]);
}
A: O(n)
B: O(2^n)
C: O(n log n)
D: O(n^2) correct answers O(n)
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. O( 1 )
Option 2. O( 2n )
Option 3. O( n log n )
A solution is said to be efficient if it: correct answers It solves the problem within the required
resource constraints.
An ADT is: correct answers the realization of a data type as a software component.
The implementation of a data type as a data structure is the physical form of an ADT. True or
false? correct answers True
Which of the following is NOT one of the design patterns mentioned in our text? Flyweight?
Visitor? Composite? Synergy? correct answers Synergy
If A={1, 2, 3, 4} and B={4, 5, 6}, find A∪ B .
A: { x | x is all positive integers }
B: {1,2,3,4,5,6}
C: {1,2,3,4,4,5,6}
D: {4} correct answers B: {1, 2, 3, 4, 5, 6}
According to the properties of logarithms, log(nm) =
A: a. log n - log m
B: n log n
C: log n + log m
D: log(n^m) correct answers C: log n + logm
Recursion is when an algorithm uses a series of loop structures to repeat an operation until the
answer has been computed. True or false? correct answers False
Which of the following is not a mathematical proof technique?
A: proof by mathematical induction
B: proof by contradiction
C. Direct proof
D. proof by consensus correct answers D. proof by consensus
Which of the following is not a characteristic of an algorithm?
A: It must be correct.
B: It must be composed of concrete steps.
C: It can have no ambiguity.
D: It must be composed of an infinite number of steps. correct answers D: It must be composed
of an infinite number of steps.
The upper bound for the growth of the Algorithms running time is represented by:
, A: Big Oh (O)
B: Big Omega(Ω)
C: Big Theta(Θ)
D: Exponential Growth correct answers A: Big Oh(O)
Asymptotic Algorithm Analysis is primarily concerned with? correct answers The growth rate
demonstrated in the algorithm running time equation
True/False: Big Theta (Θ) indicates that the Upper and Lower bounds of an algorithm are the
same. correct answers True
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.println(a[i]);
}
A: O(n)
B: O(2^n)
C: O(n log n)
D: O(n^2) correct answers O(n)
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. O( 1 )
Option 2. O( 2n )
Option 3. O( n log n )