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

WGU C949 DATA STRUCTURES AND ALGORITHMS I OBJECTIVE ASSESSMENT QUESTIONS COMPLETE WITH VERIFIED ANSWERS AND EXPLANATIONS

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

WGU C949 DATA STRUCTURES AND ALGORITHMS I OBJECTIVE ASSESSMENT QUESTIONS COMPLETE WITH VERIFIED ANSWERS AND EXPLANATIONS Question 1 Which of the following is considered a primitive data type? A) Array B) Linked List C) Integer D) Stack Correct Answer: C) Integer Rationale: Primitive data types are the basic building blocks provided by programming languages. Integers, characters, booleans, and floating-point numbers are primitive types. Arrays, linked lists, and stacks are non-primitive or abstract data structures built from primitive types. ________________________________________ Question 2 What is the primary purpose of a data structure? A) To execute program instructions B) To organize and store data efficiently C) To compile source code D) To manage network connections Correct Answer: B) To organize and store data efficiently Rationale: A data structure is a way of collecting and organizing data so that operations can be performed on it effectively. It provides a framework for storing, accessing, and manipulating data. The choice of data structure directly affects algorithm efficiency. ________________________________________ Question 3 Which Abstract Data Type (ADT) stores items in which the order does not matter and duplicate items are allowed? A) Set B) Bag C) Stack D) Queue Correct Answer: B) Bag Rationale: A Bag is an ADT for storing items where order does not matter and duplicate items are allowed. A Set does not allow duplicates, while Stack and Queue enforce specific ordering rules for insertion and removal. ________________________________________ Question 4 Which data structure follows the Last-In, First-Out (LIFO) principle? A) Queue B) Deque C) Stack D) Priority Queue Correct Answer: C) Stack Rationale: A stack follows the Last-In, First-Out (LIFO) principle. All operations (push and pop) occur at the "top" of the stack, meaning the last item placed on the stack is the first one retrieved. ________________________________________ Question 5 What is the time complexity for accessing an element by index in an array? A) O(1) B) O(log n) C) O(n) D) O(n²) Correct Answer: A) O(1) Rationale: Arrays provide O(1) time complexity for accessing elements by index. Because they occupy contiguous memory blocks, the address of any element can be calculated directly using the base address and index offset. ________________________________________ Question 6 Which data structure allows elements to be inserted and deleted from only one end and provides no direct access to the other end? A) Doubly Linked List B) Deque C) Stack D) Circular Queue Correct Answer: C) Stack Rationale: A stack follows the Last-In, First-Out (LIFO) principle. All operations (push and pop) occur at the "top" of the stack, meaning the last item placed on the stack is the first one retrieved. ________________________________________ Question 7 Which statement best describes a queue data structure? A) It is a sequence of elements in which insertion and deletion take place at one end B) It is a sequence of elements in which insertion and deletion take place at both ends C) It is a sequence of elements where insertion can take place anywhere but deletion is at the front D) It is a sequence of elements where insertions take place at the back and deletions at the front Correct Answer: D) It is a sequence of elements where insertions take place at the back and deletions at the front Rationale: A queue follows the First-In, First-Out (FIFO) principle. This means the first element added to the structure (at the back/rear) is the first one to be removed (from the front). ________________________________________ Question 8 Which data structure allows for the insertion and deletion of data elements at both the front and the rear ends?

Vista previa del contenido

WGU C949 DATA STRUCTURES AND ALGORITHMS I
OBJECTIVE ASSESSMENT QUESTIONS COMPLETE WITH
VERIFIED ANSWERS AND EXPLANATIONS




Question 1
Which of the following is considered a primitive data type?
A) Array
B) Linked List
C) Integer
D) Stack
Correct Answer: C) Integer
Rationale: Primitive data types are the basic building blocks provided by
programming languages. Integers, characters, booleans, and floating-
point numbers are primitive types. Arrays, linked lists, and stacks are
non-primitive or abstract data structures built from primitive types.


Question 2
What is the primary purpose of a data structure?
A) To execute program instructions
B) To organize and store data efficiently
C) To compile source code
D) To manage network connections

,Correct Answer: B) To organize and store data efficiently
Rationale: A data structure is a way of collecting and organizing data so
that operations can be performed on it effectively. It provides a
framework for storing, accessing, and manipulating data. The choice of
data structure directly affects algorithm efficiency.


Question 3
Which Abstract Data Type (ADT) stores items in which the order does
not matter and duplicate items are allowed?
A) Set
B) Bag
C) Stack
D) Queue
Correct Answer: B) Bag
Rationale: A Bag is an ADT for storing items where order does not
matter and duplicate items are allowed. A Set does not allow duplicates,
while Stack and Queue enforce specific ordering rules for insertion and
removal.


Question 4
Which data structure follows the Last-In, First-Out (LIFO) principle?
A) Queue
B) Deque
C) Stack
D) Priority Queue

,Correct Answer: C) Stack
Rationale: A stack follows the Last-In, First-Out (LIFO) principle. All
operations (push and pop) occur at the "top" of the stack, meaning the
last item placed on the stack is the first one retrieved.


Question 5
What is the time complexity for accessing an element by index in an
array?
A) O(1)
B) O(log n)
C) O(n)
D) O(n²)
Correct Answer: A) O(1)
Rationale: Arrays provide O(1) time complexity for accessing elements
by index. Because they occupy contiguous memory blocks, the address
of any element can be calculated directly using the base address and
index offset.


Question 6
Which data structure allows elements to be inserted and deleted from
only one end and provides no direct access to the other end?
A) Doubly Linked List
B) Deque
C) Stack
D) Circular Queue

, Correct Answer: C) Stack
Rationale: A stack follows the Last-In, First-Out (LIFO) principle. All
operations (push and pop) occur at the "top" of the stack, meaning the
last item placed on the stack is the first one retrieved.


Question 7
Which statement best describes a queue data structure?
A) It is a sequence of elements in which insertion and deletion take
place at one end
B) It is a sequence of elements in which insertion and deletion take
place at both ends
C) It is a sequence of elements where insertion can take place anywhere
but deletion is at the front
D) It is a sequence of elements where insertions take place at the back
and deletions at the front
Correct Answer: D) It is a sequence of elements where insertions take
place at the back and deletions at the front
Rationale: A queue follows the First-In, First-Out (FIFO) principle. This
means the first element added to the structure (at the back/rear) is the
first one to be removed (from the front).


Question 8
Which data structure allows for the insertion and deletion of data
elements at both the front and the rear ends?

Información del documento

Subido en
15 de agosto de 2026
Número de páginas
98
Escrito en
2026/2027
Tipo
Examen
Contiene
Preguntas y respuestas
$17.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.
maingirose
4.3
(4)
Vendido
27
Seguidores
0
Artículos
1921
Última venta
1 semana 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