WGU C949 Data Structures and Algorithms I
WGU C949 Data Structures and
Algorithms I OA Practice Exam Questions
and Answers 2026. Advanced NCLEX-
Style 100 MCQs with Rationales.
Question 1
Which data structure follows the Last-In, First-Out (LIFO) principle?
A. Queue
B. Stack
C. Linked List
D. Tree
Answer: B. Stack
Rationale:
A stack removes the most recently added item first (LIFO). Queues use FIFO, while linked lists
and trees do not inherently enforce LIFO ordering.
Question 2
Which Big-O notation represents constant-time complexity?
A. O(log n)
B. O(n)
C. O(1)
D. O(n²)
Answer: C. O(1)
Rationale:
Constant-time operations take the same amount of time regardless of input size, such as
accessing an array element by index.
Question 3
, WGU C949 Data Structures and Algorithms I
Which searching algorithm requires the data to be sorted before searching?
A. Linear Search
B. Binary Search
C. Breadth-First Search
D. Depth-First Search
Answer: B. Binary Search
Rationale:
Binary search repeatedly divides a sorted collection in half. Linear search works on both sorted
and unsorted data.
Question 4
What is the worst-case time complexity of linear search?
A. O(log n)
B. O(1)
C. O(n)
D. O(n log n)
Answer: C. O(n)
Rationale:
In the worst case, every element must be examined.
Question 5
Which data structure is typically used to implement Breadth-First Search (BFS)?
A. Stack
B. Queue
C. Heap
D. Array
Answer: B. Queue
Rationale:
BFS visits nodes level by level, making a queue ideal for maintaining the order of traversal.
, WGU C949 Data Structures and Algorithms I
Question 6
Which sorting algorithm repeatedly swaps adjacent elements until the list is sorted?
A. Merge Sort
B. Quick Sort
C. Bubble Sort
D. Heap Sort
Answer: C. Bubble Sort
Rationale:
Bubble sort compares adjacent elements and swaps them when they are out of order.
Question 7
What is the average-case time complexity of binary search?
A. O(n)
B. O(log n)
C. O(n²)
D. O(1)
Answer: B. O(log n)
Rationale:
Each comparison eliminates half of the remaining search space.
Question 8
Which data structure is best for representing a hierarchical organization chart?
A. Queue
B. Tree
C. Stack
D. Hash Table
Answer: B. Tree
Rationale:
Trees naturally model parent-child relationships.
, WGU C949 Data Structures and Algorithms I
Question 9
What is the primary advantage of a hash table?
A. Sorted storage
B. Fast average lookup
C. Minimal memory usage
D. Guaranteed O(1) worst-case search
Answer: B. Fast average lookup
Rationale:
Hash tables provide average O(1) insertion and lookup, although worst-case performance can
degrade if many collisions occur.
Question 10
Which traversal visits the root before its children?
A. Inorder
B. Postorder
C. Preorder
D. Level-order
Answer: C. Preorder
Rationale:
Preorder traversal processes the root first, then recursively visits the left and right subtrees.
Question 11
Which ADT operates on a First-In, First-Out (FIFO) basis?
A. Stack
B. Queue
C. Binary Tree
D. Graph
Answer: B. Queue
WGU C949 Data Structures and
Algorithms I OA Practice Exam Questions
and Answers 2026. Advanced NCLEX-
Style 100 MCQs with Rationales.
Question 1
Which data structure follows the Last-In, First-Out (LIFO) principle?
A. Queue
B. Stack
C. Linked List
D. Tree
Answer: B. Stack
Rationale:
A stack removes the most recently added item first (LIFO). Queues use FIFO, while linked lists
and trees do not inherently enforce LIFO ordering.
Question 2
Which Big-O notation represents constant-time complexity?
A. O(log n)
B. O(n)
C. O(1)
D. O(n²)
Answer: C. O(1)
Rationale:
Constant-time operations take the same amount of time regardless of input size, such as
accessing an array element by index.
Question 3
, WGU C949 Data Structures and Algorithms I
Which searching algorithm requires the data to be sorted before searching?
A. Linear Search
B. Binary Search
C. Breadth-First Search
D. Depth-First Search
Answer: B. Binary Search
Rationale:
Binary search repeatedly divides a sorted collection in half. Linear search works on both sorted
and unsorted data.
Question 4
What is the worst-case time complexity of linear search?
A. O(log n)
B. O(1)
C. O(n)
D. O(n log n)
Answer: C. O(n)
Rationale:
In the worst case, every element must be examined.
Question 5
Which data structure is typically used to implement Breadth-First Search (BFS)?
A. Stack
B. Queue
C. Heap
D. Array
Answer: B. Queue
Rationale:
BFS visits nodes level by level, making a queue ideal for maintaining the order of traversal.
, WGU C949 Data Structures and Algorithms I
Question 6
Which sorting algorithm repeatedly swaps adjacent elements until the list is sorted?
A. Merge Sort
B. Quick Sort
C. Bubble Sort
D. Heap Sort
Answer: C. Bubble Sort
Rationale:
Bubble sort compares adjacent elements and swaps them when they are out of order.
Question 7
What is the average-case time complexity of binary search?
A. O(n)
B. O(log n)
C. O(n²)
D. O(1)
Answer: B. O(log n)
Rationale:
Each comparison eliminates half of the remaining search space.
Question 8
Which data structure is best for representing a hierarchical organization chart?
A. Queue
B. Tree
C. Stack
D. Hash Table
Answer: B. Tree
Rationale:
Trees naturally model parent-child relationships.
, WGU C949 Data Structures and Algorithms I
Question 9
What is the primary advantage of a hash table?
A. Sorted storage
B. Fast average lookup
C. Minimal memory usage
D. Guaranteed O(1) worst-case search
Answer: B. Fast average lookup
Rationale:
Hash tables provide average O(1) insertion and lookup, although worst-case performance can
degrade if many collisions occur.
Question 10
Which traversal visits the root before its children?
A. Inorder
B. Postorder
C. Preorder
D. Level-order
Answer: C. Preorder
Rationale:
Preorder traversal processes the root first, then recursively visits the left and right subtrees.
Question 11
Which ADT operates on a First-In, First-Out (FIFO) basis?
A. Stack
B. Queue
C. Binary Tree
D. Graph
Answer: B. Queue