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 47 páginas
Examen

WGU C949 Final Exam Data Structures and Algorithms – Higher Education Computer Science Curriculum

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

WGU C949 Final Exam Data Structures and Algorithms – Higher Education Computer Science Curriculum

Vista previa del contenido

WGU C949 Final Exam Data Structures and Algorithms –
Higher Education Computer Science Curriculum
Section 1: Foundational Concepts & Pseudocode (1-15)
1. What is the primary difference between an Abstract Data Type (ADT) and a
Data Structure?
• A) An ADT is a physical implementation, while a data structure is a logical
definition.
• B) An ADT defines the behavior (operations) without specifying
implementation, while a data structure is a concrete way to store and
organize data.
• C) There is no difference; the terms are interchangeable.
• D) An ADT is always more efficient than a data structure.

Correct Answer: B
Rationale: An ADT (like a Stack) specifies what operations are possible (push,
pop) and their behavior. A data structure (like an Array or Linked List) is
the how—a specific, concrete implementation used to realize the ADT.
2. In pseudocode, what does the operation x ← y signify?
• A) Compare x and y for equality.
• B) Assign the value of y to x.
• C) Return the value of x and y.
• D) Swap the values of x and y.

Correct Answer: B
Rationale: The left-arrow operator ← is standard in pseudocode to denote
assignment. It takes the value from the right side and stores it in the variable on
the left side.
3. Given the following pseudocode, what is the final value of sum?
text

,sum ← 0
FOR i ← 1 TO 5
IF i MOD 2 == 0 THEN
sum ← sum + i
ENDIF
ENDFOR
• A) 6
• B) 9
• C) 15
• D) 0

Correct Answer: A
Rationale: The loop iterates from 1 to 5. The condition i MOD 2 == 0 is true
for even numbers: 2 and 4. The sum is 0 + 2 + 4 = 6.
4. Which of the following is a characteristic of a well-designed algorithm?
• A) It must be implemented in a specific programming language.
• B) It is unambiguous and has clearly defined steps.
• C) It produces an output for any set of inputs, valid or invalid.
• D) It should be as complex as possible to handle all edge cases.

Correct Answer: B
Rationale: Unambiguity and well-defined steps are fundamental to an
algorithm. It must be a finite, clear sequence of instructions. While handling
invalid inputs is good, an algorithm doesn't have to produce a correct output for
them, just a defined response (e.g., an error). Complexity is not a goal.
5. What is the purpose of a WHILE loop in pseudocode?
• A) To execute a block of code a predetermined number of times.

, • B) To execute a block of code zero or more times based on a condition
being true.
• C) To execute a block of code at least once before checking a condition.
• D) To execute a block of code for each item in a collection.

Correct Answer: B
Rationale: A WHILE loop checks the condition before each iteration. If the
condition is initially false, the block of code is never executed. It runs zero or more
times.
6. Which data structure is best described as a "First-In, First-Out" (FIFO)
structure?
• A) Stack
• B) Queue
• C) Linked List
• D) Array

Correct Answer: B
Rationale: The FIFO principle is the defining characteristic of a Queue. The
first element added (enqueued) is the first one removed (dequeued).
7. In the context of algorithm design, what is "abstraction"?
• A) Hiding complex implementation details and exposing only the essential
features.
• B) Breaking a problem down into smaller, more manageable sub-problems.
• C) Finding a more efficient way to solve a problem.
• D) A method for testing the functionality of an algorithm.

Correct Answer: A
Rationale: Abstraction is a fundamental principle of computer science that
focuses on what a system does, not how it does it. It helps manage complexity.
8. The parameters of a recursive function are used to:

, • A) Maintain global state.
• B) Determine the next value in a sequence.
• C) Track the progress of the recursion and define the base case.
• D) Store the final result of the calculation.

Correct Answer: C
Rationale: Parameters in recursive functions are crucial for passing state
down the call stack. They change with each call, allowing the function to work on
a smaller version of the problem and eventually reach the base case.
9. What is the base case in a recursive function?
• A) The most complex case that requires the most computation.
• B) The condition that stops the recursion and returns a value without
further recursive calls.
• C) The first recursive call made by the function.
• D) The last recursive call made before the function returns.

Correct Answer: B
Rationale: The base case is the termination condition. Without it, the
recursion would continue infinitely (or until a stack overflow).
10. What is the primary benefit of using modularity when designing an
algorithm?
• A) It increases the overall execution speed.
• B) It allows different team members to work on different parts
simultaneously.
• C) It eliminates the need for comments in the code.
• D) It ensures that the algorithm is bug-free.

Correct Answer: B
Rationale: Modularity means breaking the algorithm into independent, self-

Información del documento

Subido en
12 de septiembre de 2026
Número de páginas
47
Escrito en
2026/2027
Tipo
Examen
Contiene
Preguntas y respuestas
$26.99

¿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

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
Vendido
19
Seguidores
1
Artículos
1322
Última venta
3 días hace



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