Escrito por estudiantes que aprobaron Inmediatamente disponible después del pago Leer en línea o como PDF ¿Documento equivocado? Cámbialo gratis 4,6 TrustPilot
logo-home
Document preview thumbnail
Vista previa 4 fuera de 66 páginas
Examen

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

Document preview thumbnail
Vista previa 4 fuera de 66 páginas

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

Vista previa del contenido

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.

Información del documento

Subido en
18 de julio de 2026
Número de páginas
66
Escrito en
2025/2026
Tipo
Examen
Contiene
Preguntas y respuestas
$27.49

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Vendido
0
Seguidores
0
Artículos
229
Última venta
-


Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes