WGU D949
WGU D949 Data Structures and Algorithms I: The
Ultimate 200-Question Exam Preparation Guide with
In-Depth Rationales for the 2026–2027 Academic Year
SECTION 1: ABSTRACT DATA TYPES (ADTs) & CORE DATA STRUCTURES (Questions 1-20)
Question 1
Which of the following best describes an Abstract Data Type (ADT)?
A) A specific implementation of a data structure in a programming language
B) A mathematical model for data types defined by their behavior and operations
C) A collection of primitive data types like int, float, and char
D) A memory allocation technique for dynamic arrays
Correct answer: B
Rationale: An ADT is a mathematical model that specifies the behavior of data types through their
operations and semantics, independent of any specific implementation. Options A, C, and D describe
implementation details, primitive types, and memory management respectively.
Question 2
Which data structure follows the Last-In-First-Out (LIFO) principle?
A) Queue
B) Deque
C) Stack
D) List
Correct answer: C
Rationale: A stack follows LIFO where the most recently added element is removed first. Queue
follows FIFO, deque allows operations at both ends, and lists provide index-based access.
Question 3
In a queue, where does insertion occur?
A) At the front end only
B) At the back end only
C) At any position
D) At both ends simultaneously
Correct answer: B
Rationale: Queues follow FIFO where insertions (enqueue) occur at the rear/back end, and deletions
(dequeue) occur at the front end. This is the fundamental property of a queue ADT.
, WGU D949
Question 4
Which of the following operations is NOT typically associated with a stack?
A) push()
B) pop()
C) enqueue()
D) peek()
Correct answer: C
Rationale: enqueue() is a queue operation. Stack operations include push (add to top), pop (remove
from top), and peek (view top element without removal).
Question 5
A deque differs from a standard queue in that:
A) It follows LIFO instead of FIFO
B) It allows insertion and deletion at both ends
C) It cannot store duplicate elements
D) It is implemented only using arrays
Correct answer: B
Rationale: Deque (double-ended queue) supports insertion and deletion at both front and rear ends.
Standard queues only allow insertion at rear and deletion at front.
Question 6
Which abstract data type allows elements to be retrieved based on their index or position?
A) Stack
B) Queue
C) List
D) Priority Queue
Correct answer: C
Rationale: Lists are ordered collections where each element can be accessed by its index/position.
Stacks and queues restrict access to one or both ends, and priority queues access by priority.
Question 7
What is represented by the notation ("AAPL", 150.25, 149.80, 151.00)?
A) Array
B) List
C) Tuple
D) Dictionary
, WGU D949
Correct answer: C
Rationale: Parentheses indicate a tuple—an immutable sequence type where element position is
significant. Arrays use square brackets [], dictionaries use {} with key-value pairs.
Question 8
Which statement about linked lists is TRUE?
A) They provide O(1) random access by index
B) Each node contains data and a reference to the next node
C) They require contiguous memory allocation
D) Insertion always requires O(n) time
Correct answer: B
Rationale: Linked lists consist of nodes where each node contains data and a reference/pointer to
the next node. They use non-contiguous memory, provide O(n) random access, and O(1) insertion at
known positions.
Question 9
For a program requiring frequent insertions at arbitrary positions, which is better?
A) Array
B) Linked List
C) Static Array
D) Tuple
Correct answer: B
Rationale: Linked lists support O(1) insertion at known positions without shifting elements. Arrays
require O(n) shifting for insertion in the middle. Tuples are immutable.
Question 10
Which data type should be used for this data: ["ID", "001", "NAME", "John", "AGE", "25"]?
A) Integer
B) String
C) Float
D) Boolean
Correct answer: B
Rationale: Since elements contain both letters and numbers with no arithmetic operations, String is
the appropriate data type. Numeric types would be inappropriate for "ID" and "NAME".
Question 11
What is the primary difference between an array and a linked list?
, WGU D949
A) Arrays are dynamic, linked lists are static
B) Arrays use contiguous memory, linked lists use non-contiguous memory
C) Arrays cannot store primitive types
D) Linked lists cannot be sorted
Correct answer: B
Rationale: Arrays store elements in contiguous memory locations, while linked lists use non-
contiguous memory with each node pointing to the next. Both can be dynamic (dynamic arrays),
store primitive types, and be sorted.
Question 12
In a singly linked list, what is the time complexity of deleting the first node?
A) O(1)
B) O(n)
C) O(log n)
D) O(n²)
Correct answer: A
Rationale: Deleting the first node requires updating the head pointer to the next node, which is a
constant-time O(1) operation. No traversal is needed.
Question 13
Which ADT is typically implemented using both an array and a linked list?
A) Stack
B) Queue
C) Deque
D) All of the above
Correct answer: D
Rationale: Stacks, queues, and deques can all be implemented using either arrays or linked lists.
Each implementation has different trade-offs in terms of memory and performance.
Question 14
What is the time complexity of accessing the kth element in a singly linked list?
A) O(1)
B) O(k)
C) O(n)
D) O(log n)
Correct answer: C (or O(k) as O(n) when k is arbitrary)
Rationale: Accessing an element by index in a linked list requires traversal from the head, taking
O(n) time in the worst case. Arrays provide O(1) random access.
WGU D949 Data Structures and Algorithms I: The
Ultimate 200-Question Exam Preparation Guide with
In-Depth Rationales for the 2026–2027 Academic Year
SECTION 1: ABSTRACT DATA TYPES (ADTs) & CORE DATA STRUCTURES (Questions 1-20)
Question 1
Which of the following best describes an Abstract Data Type (ADT)?
A) A specific implementation of a data structure in a programming language
B) A mathematical model for data types defined by their behavior and operations
C) A collection of primitive data types like int, float, and char
D) A memory allocation technique for dynamic arrays
Correct answer: B
Rationale: An ADT is a mathematical model that specifies the behavior of data types through their
operations and semantics, independent of any specific implementation. Options A, C, and D describe
implementation details, primitive types, and memory management respectively.
Question 2
Which data structure follows the Last-In-First-Out (LIFO) principle?
A) Queue
B) Deque
C) Stack
D) List
Correct answer: C
Rationale: A stack follows LIFO where the most recently added element is removed first. Queue
follows FIFO, deque allows operations at both ends, and lists provide index-based access.
Question 3
In a queue, where does insertion occur?
A) At the front end only
B) At the back end only
C) At any position
D) At both ends simultaneously
Correct answer: B
Rationale: Queues follow FIFO where insertions (enqueue) occur at the rear/back end, and deletions
(dequeue) occur at the front end. This is the fundamental property of a queue ADT.
, WGU D949
Question 4
Which of the following operations is NOT typically associated with a stack?
A) push()
B) pop()
C) enqueue()
D) peek()
Correct answer: C
Rationale: enqueue() is a queue operation. Stack operations include push (add to top), pop (remove
from top), and peek (view top element without removal).
Question 5
A deque differs from a standard queue in that:
A) It follows LIFO instead of FIFO
B) It allows insertion and deletion at both ends
C) It cannot store duplicate elements
D) It is implemented only using arrays
Correct answer: B
Rationale: Deque (double-ended queue) supports insertion and deletion at both front and rear ends.
Standard queues only allow insertion at rear and deletion at front.
Question 6
Which abstract data type allows elements to be retrieved based on their index or position?
A) Stack
B) Queue
C) List
D) Priority Queue
Correct answer: C
Rationale: Lists are ordered collections where each element can be accessed by its index/position.
Stacks and queues restrict access to one or both ends, and priority queues access by priority.
Question 7
What is represented by the notation ("AAPL", 150.25, 149.80, 151.00)?
A) Array
B) List
C) Tuple
D) Dictionary
, WGU D949
Correct answer: C
Rationale: Parentheses indicate a tuple—an immutable sequence type where element position is
significant. Arrays use square brackets [], dictionaries use {} with key-value pairs.
Question 8
Which statement about linked lists is TRUE?
A) They provide O(1) random access by index
B) Each node contains data and a reference to the next node
C) They require contiguous memory allocation
D) Insertion always requires O(n) time
Correct answer: B
Rationale: Linked lists consist of nodes where each node contains data and a reference/pointer to
the next node. They use non-contiguous memory, provide O(n) random access, and O(1) insertion at
known positions.
Question 9
For a program requiring frequent insertions at arbitrary positions, which is better?
A) Array
B) Linked List
C) Static Array
D) Tuple
Correct answer: B
Rationale: Linked lists support O(1) insertion at known positions without shifting elements. Arrays
require O(n) shifting for insertion in the middle. Tuples are immutable.
Question 10
Which data type should be used for this data: ["ID", "001", "NAME", "John", "AGE", "25"]?
A) Integer
B) String
C) Float
D) Boolean
Correct answer: B
Rationale: Since elements contain both letters and numbers with no arithmetic operations, String is
the appropriate data type. Numeric types would be inappropriate for "ID" and "NAME".
Question 11
What is the primary difference between an array and a linked list?
, WGU D949
A) Arrays are dynamic, linked lists are static
B) Arrays use contiguous memory, linked lists use non-contiguous memory
C) Arrays cannot store primitive types
D) Linked lists cannot be sorted
Correct answer: B
Rationale: Arrays store elements in contiguous memory locations, while linked lists use non-
contiguous memory with each node pointing to the next. Both can be dynamic (dynamic arrays),
store primitive types, and be sorted.
Question 12
In a singly linked list, what is the time complexity of deleting the first node?
A) O(1)
B) O(n)
C) O(log n)
D) O(n²)
Correct answer: A
Rationale: Deleting the first node requires updating the head pointer to the next node, which is a
constant-time O(1) operation. No traversal is needed.
Question 13
Which ADT is typically implemented using both an array and a linked list?
A) Stack
B) Queue
C) Deque
D) All of the above
Correct answer: D
Rationale: Stacks, queues, and deques can all be implemented using either arrays or linked lists.
Each implementation has different trade-offs in terms of memory and performance.
Question 14
What is the time complexity of accessing the kth element in a singly linked list?
A) O(1)
B) O(k)
C) O(n)
D) O(log n)
Correct answer: C (or O(k) as O(n) when k is arbitrary)
Rationale: Accessing an element by index in a linked list requires traversal from the head, taking
O(n) time in the worst case. Arrays provide O(1) random access.