WGU C960 – Discrete Mathematics II
Objective Assessment Review Full
Questions, Correct Answers, and
Worked Solutions | 2026 Update | 100%
Correct
This comprehensive review covers the key topics for the WGU C960
Discrete Mathematics II Objective Assessment. Each question
includes a detailed solution with step-by-step worked examples to
help you master the material.
SECTION 1: ALGORITHMS & COMPLEXITY
Question 1
What is the time complexity of the following algorithm in terms of
Big-O notation?
text
Copy
Download
def example_algorithm(n):
for i in range(n):
, for j in range(n):
print(i, j)
A. O(1)
B. O(n)
C. O(n²)
D. O(2ⁿ)
Correct Answer: C
Rationale: The outer loop runs n times, and the inner loop runs n times
for each iteration of the outer loop. This results in n × n = n²
operations. Therefore, the time complexity is O(n²).
Question 2
What is the time complexity of the following recursive algorithm?
text
Copy
Download
def factorial(n):
if n <= 1:
return 1
return n * factorial(n - 1)
A. O(1)
B. O(n)
C. O(n²)
D. O(log n)
,Correct Answer: B
Rationale: The algorithm makes n recursive calls, each performing a
constant amount of work. Therefore, the time complexity is O(n).
Question 3
Which of the following algorithms has O(n log n) time complexity in
the average case?
A. Bubble sort
B. Insertion sort
C. Merge sort
D. Selection sort
Correct Answer: C
Rationale: Merge sort has O(n log n) time complexity in all cases
(best, average, and worst). Bubble sort, insertion sort, and selection
sort all have O(n²) time complexity in the average case.
Question 4
What is the time complexity of binary search on a sorted array of size
n?
A. O(1)
B. O(log n)
C. O(n)
D. O(n log n)
Correct Answer: B
, Rationale: Binary search repeatedly divides the search interval in half.
After k steps, the interval size is n/2^k. Setting this equal to 1 gives k =
log₂(n). Therefore, the time complexity is O(log n).
Question 5
What is the space complexity of a recursive implementation of
factorial?
A. O(1)
B. O(n)
C. O(n²)
D. O(log n)
Correct Answer: B
Rationale: Each recursive call adds a frame to the call stack. The
algorithm makes n recursive calls, so the space complexity is O(n) due
to the call stack.
Question 6
Which of the following is NOT a valid Big-O complexity class?
A. O(1)
B. O(n)
C. O(n!)
D. O(n²)
Correct Answer: C
Rationale: While n! grows faster than any polynomial or exponential
function, Big-O notation is used to describe asymptotic upper bounds.
Objective Assessment Review Full
Questions, Correct Answers, and
Worked Solutions | 2026 Update | 100%
Correct
This comprehensive review covers the key topics for the WGU C960
Discrete Mathematics II Objective Assessment. Each question
includes a detailed solution with step-by-step worked examples to
help you master the material.
SECTION 1: ALGORITHMS & COMPLEXITY
Question 1
What is the time complexity of the following algorithm in terms of
Big-O notation?
text
Copy
Download
def example_algorithm(n):
for i in range(n):
, for j in range(n):
print(i, j)
A. O(1)
B. O(n)
C. O(n²)
D. O(2ⁿ)
Correct Answer: C
Rationale: The outer loop runs n times, and the inner loop runs n times
for each iteration of the outer loop. This results in n × n = n²
operations. Therefore, the time complexity is O(n²).
Question 2
What is the time complexity of the following recursive algorithm?
text
Copy
Download
def factorial(n):
if n <= 1:
return 1
return n * factorial(n - 1)
A. O(1)
B. O(n)
C. O(n²)
D. O(log n)
,Correct Answer: B
Rationale: The algorithm makes n recursive calls, each performing a
constant amount of work. Therefore, the time complexity is O(n).
Question 3
Which of the following algorithms has O(n log n) time complexity in
the average case?
A. Bubble sort
B. Insertion sort
C. Merge sort
D. Selection sort
Correct Answer: C
Rationale: Merge sort has O(n log n) time complexity in all cases
(best, average, and worst). Bubble sort, insertion sort, and selection
sort all have O(n²) time complexity in the average case.
Question 4
What is the time complexity of binary search on a sorted array of size
n?
A. O(1)
B. O(log n)
C. O(n)
D. O(n log n)
Correct Answer: B
, Rationale: Binary search repeatedly divides the search interval in half.
After k steps, the interval size is n/2^k. Setting this equal to 1 gives k =
log₂(n). Therefore, the time complexity is O(log n).
Question 5
What is the space complexity of a recursive implementation of
factorial?
A. O(1)
B. O(n)
C. O(n²)
D. O(log n)
Correct Answer: B
Rationale: Each recursive call adds a frame to the call stack. The
algorithm makes n recursive calls, so the space complexity is O(n) due
to the call stack.
Question 6
Which of the following is NOT a valid Big-O complexity class?
A. O(1)
B. O(n)
C. O(n!)
D. O(n²)
Correct Answer: C
Rationale: While n! grows faster than any polynomial or exponential
function, Big-O notation is used to describe asymptotic upper bounds.