Study Guide 2026/2027, Covering Data Types and Abstract Data Types, Arrays and
Lists, Linked Lists, Stacks, Queues and Deques, Hash Tables and Hashing, Binary
Search Trees, Heaps and Priority Queues, Tree Traversals, Searching Algorithms,
Linear Search and Binary Search, Sorting Algorithms, Bubble Sort, Selection Sort,
Insertion Sort, Merge Sort and Quick Sort, Algorithm Analysis, Big-O Time and Space
Complexity, Recursion, Pseudocode, Python Data Structures and Functions, Object-
Oriented Programming Concepts, Classes and Objects, Algorithm Efficiency, Dynamic
Data Structures, Problem-Solving Strategies, Scenario-Based Questions, Practice
Questions With Detailed Rationales, and Comprehensive Preparation for the WGU
C949 Objective Assessment
Question 1: Which of the following best describes the primary purpose of a data structure?
A. To define the syntax of a programming language
B. To organize and store data for efficient access and modification
C. To execute algorithms in parallel processing environments
D. To provide a graphical user interface for database management
CORRECT ANSWER: B. To organize and store data for efficient access and modification
Rationale: Data structures are specialized formats for organizing, processing, retrieving, and
storing data. While they interact with algorithms, their fundamental purpose is to manage data
efficiently in terms of time and space.
Question 2: An algorithm is defined as a finite sequence of well-defined instructions. Which
characteristic is NOT essential for an algorithm?
A. Input
B. Output
C. Ambiguity
D. Finiteness
CORRECT ANSWER: C. Ambiguity
Rationale: Algorithms must be unambiguous. Every step and its order must be clearly defined.
Ambiguity would lead to unpredictable or incorrect results, making it an undesirable and non-
essential characteristic.
Question 3: What is the time complexity of accessing an element in an array by its index?
A. O(1)
B. O(log n)
C. O(n)
D. O(n^2)
,CORRECT ANSWER: A. O(1)
Rationale: Arrays provide direct access to any element if its index is known. The memory
address is calculated using the base address and the index, making the operation constant time
regardless of the array size.
Question 4: Which data structure operates on a Last-In-First-Out (LIFO) principle?
A. Queue
B. Stack
C. Linked List
D. Tree
CORRECT ANSWER: B. Stack
Rationale: A stack is an abstract data type that follows the LIFO principle. The most recently
added element is the first one to be removed. A queue is FIFO, and linked lists and trees have
different ordering properties.
Question 5: What is the worst-case time complexity for searching an element in a singly
linked list?
A. O(1)
B. O(log n)
C. O(n)
D. O(n log n)
CORRECT ANSWER: C. O(n)
Rationale: In a singly linked list, there is no direct access to elements by index. To find a specific
element, you must traverse the list from the head node, potentially visiting all n nodes in the
worst case.
Question 6: Which of the following is a key advantage of a doubly linked list over a singly
linked list?
A. It requires less memory
B. It allows for faster insertion at the head
C. It enables traversal in both directions
D. It simplifies the implementation of algorithms
CORRECT ANSWER: C. It enables traversal in both directions
Rationale: A doubly linked list contains pointers to both the next and previous nodes. This
allows for bidirectional traversal, which simplifies operations like deletion of a given node
without having to traverse from the head to find its predecessor.
,Question 7: A queue is often implemented using a circular array. What is the primary benefit
of this approach?
A. It prevents overflow errors
B. It allows for dynamic resizing
C. It optimizes the use of memory by reusing vacated spaces
D. It simplifies the enqueue and dequeue logic
CORRECT ANSWER: C. It optimizes the use of memory by reusing vacated spaces
Rationale: In a standard array-based queue, elements shift forward when dequeued, leading to
wasted space. A circular array uses modulo arithmetic to wrap the front and rear pointers,
allowing the queue to reuse positions that are no longer occupied.
Question 8: What is the postfix notation of the infix expression: (A + B) * (C - D)?
A. A B + C D - *
B. A B C D - + *
C. A B + C - D *
D. A B C + - D *
**CORRECT ANSWER: A. A B + C D - ***
Rationale: Converting to postfix involves moving operators after their operands. A+B becomes
AB+, C-D becomes CD-, and the multiplication of these two results yields AB+CD-*.
Question 9: In the context of trees, what is the degree of a node?
A. The depth of the node from the root
B. The number of children that node has
C. The height of the subtree rooted at that node
D. The number of edges on the longest path from the node to a leaf
CORRECT ANSWER: B. The number of children that node has
Rationale: The degree of a node in a tree data structure is defined as the total number of child
nodes connected to it. Leaves have a degree of 0.
Question 10: What is the maximum number of nodes at level 'l' of a binary tree (where the
root is at level 0)?
A. l
B. 2^l
C. 2^(l+1) - 1
D. l^2
CORRECT ANSWER: B. 2^l
, Rationale: At level 0, there is 1 (2^0) node. At level 1, there can be 2 (2^1), at level 2, 4 (2^2),
and so on. Therefore, the maximum number of nodes at any level 'l' is 2^l.
Question 11: Which of the following tree traversal algorithms visits the root node last?
A. Preorder
B. Inorder
C. Postorder
D. Level-order
CORRECT ANSWER: C. Postorder
Rationale: The order of traversal for postorder is Left, Right, Root. Therefore, the root node is
the last node to be visited. In preorder, the root is first; in inorder, it is visited between the left
and right subtrees.
Question 12: A binary search tree (BST) has nodes with values 10, 5, 15, 3, 7. What is the
inorder traversal of this tree?
A. 10, 5, 15, 3, 7
B. 3, 5, 7, 10, 15
C. 15, 10, 7, 5, 3
D. 3, 7, 5, 10, 15
CORRECT ANSWER: B. 3, 5, 7, 10, 15
Rationale: Inorder traversal of a BST visits nodes in ascending order. The left subtree (3,5,7) is
visited first, then the root (10), and finally the right subtree (15), resulting in 3, 5, 7, 10, 15.
Question 13: What is the defining property of a heap data structure?
A. It is a complete binary tree with a specific ordering property
B. It is a balanced binary search tree
C. It is a graph with no cycles
D. It is a collection of elements sorted in ascending order
CORRECT ANSWER: A. It is a complete binary tree with a specific ordering property
Rationale: A heap is a specialized tree-based structure that must be a complete binary tree (all
levels filled except possibly the last) and must satisfy the heap property (max-heap: parent >=
children; min-heap: parent <= children).
Question 14: For a max-heap, which node contains the largest element?
A. The leftmost leaf
B. The rightmost leaf