WGU C949 DATA STRUCTURES AND
ALGORITHMS II – FINAL EXAM | STUDY
GUIDE | LATEST UPDATE 2026/2027 |
PRACTICE QUESTIONS AND ANSWERS |
EXAM REVIEW
TABLE OF CONTENTS
1. Data Types: Primitive Types, Abstract Data Types, and Type Systems
2. Arrays, Lists, and Strings
3. Linked Lists: Singly, Doubly, and Circular
4. Stacks, Queues, and Deques
5. Hash Tables and Collision Resolution
6. Binary Search Trees and Tree Traversals
7. Heaps and Priority Queues
8. Graphs: Representations, Traversals, and Applications
9. Algorithm Analysis and Big-O Complexity
10. Searching Algorithms: Linear, Binary, and Hash-Based
11. Sorting Algorithms: Comparison-Based and Non-Comparison-Based
12. Recursion, Iteration, and Backtracking
13. Algorithmic Design Paradigms: Greedy, Divide-and-Conquer, and Dynamic
Programming
, WGU | 2
Question 1: What is the primary characteristic that distinguishes an Abstract Data Type
(ADT) from a primitive data type?
A) ADTs are defined by their behavior and operations, while primitive types are built-in
single-value types defined by the language
B) Primitive types are user-defined, while ADTs are language-defined
C) ADTs always use less memory than primitive types
D) Primitive types support method calls, while ADTs do not
Correct Answer: A) ADTs are defined by their behavior and operations, while primitive
types are built-in single-value types defined by the language
An ADT specifies a set of values and the operations that can be performed on those values
without specifying the underlying implementation. Primitive types such as int, float, and
boolean are built-in atomic types provided directly by the language. ADTs like Stack, Queue,
and List are defined by their behavioral contracts, not their storage mechanisms.
Question 2: A developer declares float price = 19.99;. Which characteristic distinguishes this
primitive data type from an ADT such as a Stack?
A) A float can hold only whole numbers, while an ADT can hold decimal values
B) A primitive type is a built-in, single-value type, while an ADT is defined by its behavior
rather than its underlying representation
C) A primitive type supports method calls, while an ADT does not
D) A primitive type must always be stored on the heap, while an ADT is stored on the stack
Correct Answer: B) A primitive type is a built-in, single-value type, while an ADT is
defined by its behavior rather than its underlying representation
Primitive types are language-defined single-value types that expose only the raw value itself.
An ADT such as a Stack is defined by its behavioral contract (push/pop operations) rather
than its internal storage. The same ADT can be implemented using either an array or a linked
list.
Question 3: In data structures terminology, what does an Abstract Data Type (ADT) specify?
, WGU | 3
A) The exact memory layout and byte ordering required for storage
B) The specific programming language in which the structure must be written
C) A set of values and the operations that can be performed on those values, without
specifying how they are implemented
D) The guaranteed worst-case time complexity of every operation
Correct Answer: C) A set of values and the operations that can be performed on those
values, without specifying how they are implemented
An ADT is a logical description of what a container does, including its allowed values and
operations, while deliberately hiding how those operations work. The implementation (array
vs. linked nodes) is left to the data structure. ADTs make no complexity guarantees;
performance depends entirely on the chosen implementation.
Question 4: Which of the following is a primitive data type?
A) Stack
B) Integer
C) Linked List
D) Queue
Correct Answer: B) Integer
An integer is a primitive (built-in) data type provided directly by the language that stores a
single atomic value. Stacks, queues, and linked lists are Abstract Data Types that must be
constructed from primitive types and other structures. Primitive types are the fundamental
building blocks of all data structures.
Question 5: Which data type is appropriate for storing a fixed-size array of integer values in
Java?
A) List
B) Tuple
C) Array
D) Dictionary
, WGU | 4
Correct Answer: C) Array
An array is the appropriate primitive data structure for storing a fixed-size collection of
elements of the same type. Lists and dictionaries are higher-level ADTs that provide more
flexibility but greater overhead. Tuples are immutable and less commonly used for numeric
collections in Java.
Question 6: Which data type should be used for the following Python object: days =
{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}?
A) Float
B) String
C) Integer
D) Boolean
Correct Answer: B) String
The object contains text values representing days of the week. Strings are appropriate for
storing textual data. Integers, floats, and booleans are used for numeric and logical values,
not text.
Question 7: Which data type should be used for the variable phoneNum = "212-555-1212"?
A) Long
B) Short
C) String
D) Integer
Correct Answer: C) String
Phone numbers contain special characters (dashes) and leading zeros that cannot be
represented as integers. Strings are the appropriate type for storing formatted sequences of
characters. Using numeric types would lose formatting and potentially leading digits.
Question 8: What are the array elements corresponding to the mid-values in the first and
second iterations of a binary search on arr = {45, 77, 89, 90, 94, 99, 100} with key = 100?