Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 4 out of 66 pages
Exam (elaborations)

WGU C960 – Discrete Mathematics II Objective Assessment Review | Questions, Correct Answers, | 2026 Update | 100% Correct. Graded A+

Document preview thumbnail
Preview 4 out of 66 pages

WGU C960 – Discrete Mathematics II Objective Assessment Review | Questions, Correct Answers, | 2026 Update | 100% Correct. Graded A+

Content preview

WGU C960 – Discrete Mathematics
II Objective Assessment Review |
Questions, Correct Answers, | 2026
Update | 100% Correct. Graded A+


Section 1: Algorithms & Pseudocode
Q1. Merge Lists Function
Question: Consider the following pseudocode:

text
Merge0(List1, List2)
Set OUTlist to empty
While List1 is not empty OR List2 is not empty
If one list is empty and the other is not,
Remove the first number from the non-empty list and add it to OUTlist
If both lists are non-empty,
Remove the first number from List1 and add it to OUTlist
Remove the first number from List2 and add it to OUTlist
Return OUTlist

If ListA = [1, 3, 5] and ListB = [2, 4, 6], what is the result of Merge0(ListA,
Merge0(ListB, ListA))?
A. [1, 2, 3, 4, 5, 6]
B. [2, 1, 4, 3, 6, 5]
C. [1, 2, 3, 1, 5, 4, 3, 6, 5]
D. [1, 3, 5, 2, 4, 6]

Solution: The correct answer is C. The function alternates, taking one element from
each list.

1. Evaluate the inner function: Merge0([2,4,6], [1,3,5]) → [2, 1, 4, 3, 6, 5].

,2. Evaluate the outer function: Merge0([1,3,5], [2,1,4,3,6,5]). It alternates: 1, 2, 3, 1, 5, 4,
then List1 is empty, so takes the rest from List2: 3, 6, 5 → [1, 2, 3, 1, 5, 4, 3, 6, 5].




Q2. While Loop Execution
Question: Given the pseudocode:

text
x := 2
count := 4
while (count > 0)
x := 2 * x
count := count - 1
End-while

What is the final value for x?
A. 8
B. 16
C. 32
D. 64

Solution: The correct answer is C. The loop runs 4 times, multiplying x by 2 each time:

 Start: x = 2
 Iteration 1: x = 4
 Iteration 2: x = 8
 Iteration 3: x = 16
 Iteration 4: x = 32




Q3. Sieve of Eratosthenes
Question: Assume the Sieve of Eratosthenes algorithm starts with S = {2, 3, 4, ...,
20}. After running the algorithm, which numbers remain in S?
A. {2, 3, 5, 7, 11, 13, 17, 19}
B. {2, 3, 5, 7, 9, 11, 13, 17, 19}
C. {1, 2, 3, 5, 7, 11, 13, 17, 19}
D. All numbers remain

,Solution: The correct answer is A. The algorithm removes multiples of each prime (2, 3,
5, 7, etc.) leaving only the prime numbers.




Q4. While Loop Iterations
Question: How many iterations will the while-loop execute?

text
product := 1
count := 5
While (count > 0)
product := product * count
count := count - 2
End-while

A. 1
B. 2
C. 3
D. 4

Solution: The correct answer is C. count takes values 5, 3, 1. The loop executes for each
of these values (3 iterations) before count becomes -1.




Q5. Nested Loops Count
Question: How many times is the variable count increased?

text
count := 0
For i = 1 to 3
For j = 1 to 4
count := count + i * j
End-for
End-for

A. 7
B. 10

, C. 12
D. 15

Solution: The correct answer is C. The outer loop runs 3 times, and the inner loop runs 4
times for each outer iteration. Total iterations = 3 × 4 = 12.




Section 2: Algorithm Analysis & Big-O Notation
Q6. Theta Notation
Question: Which function is Θ(x³)?
A. 4x² + 5x
B. 4x³ + √x - 1
C. 3x³ + 2x⁴
D. x² + x

Solution: The correct answer is B. For a function to be Θ(x³), x³ must be the dominant
term.

 Option B: 4x³ + √x - 1 has x³ as the fastest-growing term.
 Option C: 3x³ + 2x⁴ is Θ(x⁴).




Q7. Big-O Notation
Question: What is the big-O notation for the function f(n) = n × log(n²) + 7n³ + 5n +
3?
A. O(n log n)
B. O(n²)
C. O(n³)
D. O(2ⁿ)

Solution: The correct answer is C. Simplify log(n²) = 2 log n. The highest degree term
is 7n³, which dominates all others as n grows large.

Document information

Uploaded on
July 18, 2026
Number of pages
66
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
$27.49

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Sold
0
Followers
0
Items
229
Last sold
-


Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions