WGU C949 Data Structures and Algorithms
Objective Assessment Exam – Complete 350
Questions with Verified Answers
Official Exam Overview:
The WGU C949 Data Structures and Algorithms I Objective Assessment evaluates learners’
knowledge of core data structures, algorithm design, and memory management concepts. The
exam emphasizes abstract data types, linked and array-based structures, algorithm efficiency, and
proper memory handling, including garbage collection.
Exam Coverage Areas:
• Abstract Data Types (ADT) and Implementations
• Linear and Non-linear Data Structures
• Stacks, Queues, Lists, and Bags
• Sorting and Searching Algorithms
• Memory Management and Garbage Collection
• Algorithm Analysis and Big O Notation
• Recursion and Iterative Problem Solving
• Multiple Choice and Short Answer Question Formats
QUESTION 1: What is true about garbage collection?
a) It prevents compilation errors
b) It reclaims memory from data structures implemented using linked allocations ✅
c) It optimizes sorting algorithms
d) It duplicates memory for performance
Rationale: Garbage collection automatically reclaims memory from objects or data structures
that are no longer in use, particularly those implemented with dynamic or linked allocations,
preventing memory leaks.
QUESTION 2: Which ADT allows access to elements using a specific index?
a) List ✅
b) Bag
c) Stack
d) Queue
Rationale: A List is an ordered collection where each element can be accessed directly using its
index or position.
QUESTION 3: Which ADT follows a Last-In-First-Out (LIFO) pattern?
,Page 2 of 60
a) Queue
b) Stack ✅
c) List
d) Bag
Rationale: A Stack removes elements in reverse order of insertion, adhering to the LIFO
principle.
QUESTION 4: Which ADT allows duplicate elements without a defined order or indexing?
a) List
b) Bag ✅
c) Stack
d) Queue
Rationale: A Bag is an unordered collection that permits duplicate elements but does not
provide positional access.
QUESTION 5: In memory management, which action is performed automatically by a garbage
collector?
a) Deleting active variables
b) Reclaiming unused memory ✅
c) Sorting data structures
d) Allocating extra disk space
Rationale: The garbage collector automatically identifies and frees memory that is no longer
referenced by the program, helping prevent memory leaks.
QUESTION: What is true about garbage collection? - ANSWER-It reclaims memory from data
structures implemented using linked allocations.
QUESTION: What is true about a data structure implemented using linked allocation? -
ANSWER-Storage is allocated using pointers to new locations as needed.
QUESTION: What are the array elements corresponding to the mid-values in the first and
second iterations of a binary search in an array arr = {45, 77, 89, 90, 94, 99, 100} and key = 100?
- ANSWER-90 and 99
QUESTION: What is the effect on the object Computing regarding garbage collection?
Computing obj = new Computing(); obj = null; - ANSWER-It is automatically available for
,Page 3 of 60
garbage collection.
QUESTION: What are the mid-values in the first and second levels of recursion in this binary
search?
int arr = {46, 76, 89, 90, 94, 99, 100} and key = 99 - ANSWER-90 and 99
QUESTION: Which data set is represented using the dictionary data type? - ANSWER-A set of
students and their test scores
1
, Page 4 of 60
QUESTION: What is a characteristic of keys in an associative dictionary data type? - ANSWER-
They are unique and immutable.
QUESTION: Which method can be used to take a value out of a dictionary? - ANSWER-
D1[key].remove(value)
Which statement describes a queue data structure? - ANSWER-It is a sequence of elements in
which insertions can take place only at the back end and deletions can take place only at the
front end.
QUESTION: Which data structure allows inserting and deleting data elements at both the front
and the rear? - ANSWER-Deques
QUESTION: Which data structure allows elements to be inserted and deleted from one end and
provides no direct access to the other end? - ANSWER-Stack
QUESTION: What are the official indexes for the list list01 given this declaration? int[ ] list01 =
{0, 2, 4, 6, 8, 10}; - ANSWER-0, 1, 2, 3, 4, 5
QUESTION: Which abstract data type (ADT) has elements of the same type so that the elements
can be retrieved based on the index or position? - ANSWER-List
QUESTION: Which data structure allows insertion and removal from only one end of the data
structure? - ANSWER-Stack
QUESTION: Which data type does the mystery function return?
return_type mystery (int R)
{
int NumUnits = R;return NumUnits * 3.14;
} - ANSWER-Double
2