Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 4 out of 98 pages
Exam (elaborations)

WGU C949 DATA STRUCTURES AND ALGORITHMS I OBJECTIVE ASSESSMENT QUESTIONS COMPLETE WITH VERIFIED ANSWERS AND EXPLANATIONS

Document preview thumbnail
Preview 4 out of 98 pages

WGU C949 DATA STRUCTURES AND ALGORITHMS I OBJECTIVE ASSESSMENT QUESTIONS COMPLETE WITH VERIFIED ANSWERS AND EXPLANATIONS Question 1 Which of the following is considered a primitive data type? A) Array B) Linked List C) Integer D) Stack Correct Answer: C) Integer Rationale: Primitive data types are the basic building blocks provided by programming languages. Integers, characters, booleans, and floating-point numbers are primitive types. Arrays, linked lists, and stacks are non-primitive or abstract data structures built from primitive types. ________________________________________ Question 2 What is the primary purpose of a data structure? A) To execute program instructions B) To organize and store data efficiently C) To compile source code D) To manage network connections Correct Answer: B) To organize and store data efficiently Rationale: A data structure is a way of collecting and organizing data so that operations can be performed on it effectively. It provides a framework for storing, accessing, and manipulating data. The choice of data structure directly affects algorithm efficiency. ________________________________________ Question 3 Which Abstract Data Type (ADT) stores items in which the order does not matter and duplicate items are allowed? A) Set B) Bag C) Stack D) Queue Correct Answer: B) Bag Rationale: A Bag is an ADT for storing items where order does not matter and duplicate items are allowed. A Set does not allow duplicates, while Stack and Queue enforce specific ordering rules for insertion and removal. ________________________________________ Question 4 Which data structure follows the Last-In, First-Out (LIFO) principle? A) Queue B) Deque C) Stack D) Priority Queue Correct Answer: C) Stack Rationale: A stack follows the Last-In, First-Out (LIFO) principle. All operations (push and pop) occur at the "top" of the stack, meaning the last item placed on the stack is the first one retrieved. ________________________________________ Question 5 What is the time complexity for accessing an element by index in an array? A) O(1) B) O(log n) C) O(n) D) O(n²) Correct Answer: A) O(1) Rationale: Arrays provide O(1) time complexity for accessing elements by index. Because they occupy contiguous memory blocks, the address of any element can be calculated directly using the base address and index offset. ________________________________________ Question 6 Which data structure allows elements to be inserted and deleted from only one end and provides no direct access to the other end? A) Doubly Linked List B) Deque C) Stack D) Circular Queue Correct Answer: C) Stack Rationale: A stack follows the Last-In, First-Out (LIFO) principle. All operations (push and pop) occur at the "top" of the stack, meaning the last item placed on the stack is the first one retrieved. ________________________________________ Question 7 Which statement best describes a queue data structure? A) It is a sequence of elements in which insertion and deletion take place at one end B) It is a sequence of elements in which insertion and deletion take place at both ends C) It is a sequence of elements where insertion can take place anywhere but deletion is at the front D) It is a sequence of elements where insertions take place at the back and deletions at the front Correct Answer: D) It is a sequence of elements where insertions take place at the back and deletions at the front Rationale: A queue follows the First-In, First-Out (FIFO) principle. This means the first element added to the structure (at the back/rear) is the first one to be removed (from the front). ________________________________________ Question 8 Which data structure allows for the insertion and deletion of data elements at both the front and the rear ends?

Content preview

WGU C949 DATA STRUCTURES AND ALGORITHMS I
OBJECTIVE ASSESSMENT QUESTIONS COMPLETE WITH
VERIFIED ANSWERS AND EXPLANATIONS




Question 1
Which of the following is considered a primitive data type?
A) Array
B) Linked List
C) Integer
D) Stack
Correct Answer: C) Integer
Rationale: Primitive data types are the basic building blocks provided by
programming languages. Integers, characters, booleans, and floating-
point numbers are primitive types. Arrays, linked lists, and stacks are
non-primitive or abstract data structures built from primitive types.


Question 2
What is the primary purpose of a data structure?
A) To execute program instructions
B) To organize and store data efficiently
C) To compile source code
D) To manage network connections

,Correct Answer: B) To organize and store data efficiently
Rationale: A data structure is a way of collecting and organizing data so
that operations can be performed on it effectively. It provides a
framework for storing, accessing, and manipulating data. The choice of
data structure directly affects algorithm efficiency.


Question 3
Which Abstract Data Type (ADT) stores items in which the order does
not matter and duplicate items are allowed?
A) Set
B) Bag
C) Stack
D) Queue
Correct Answer: B) Bag
Rationale: A Bag is an ADT for storing items where order does not
matter and duplicate items are allowed. A Set does not allow duplicates,
while Stack and Queue enforce specific ordering rules for insertion and
removal.


Question 4
Which data structure follows the Last-In, First-Out (LIFO) principle?
A) Queue
B) Deque
C) Stack
D) Priority Queue

,Correct Answer: C) Stack
Rationale: A stack follows the Last-In, First-Out (LIFO) principle. All
operations (push and pop) occur at the "top" of the stack, meaning the
last item placed on the stack is the first one retrieved.


Question 5
What is the time complexity for accessing an element by index in an
array?
A) O(1)
B) O(log n)
C) O(n)
D) O(n²)
Correct Answer: A) O(1)
Rationale: Arrays provide O(1) time complexity for accessing elements
by index. Because they occupy contiguous memory blocks, the address
of any element can be calculated directly using the base address and
index offset.


Question 6
Which data structure allows elements to be inserted and deleted from
only one end and provides no direct access to the other end?
A) Doubly Linked List
B) Deque
C) Stack
D) Circular Queue

, Correct Answer: C) Stack
Rationale: A stack follows the Last-In, First-Out (LIFO) principle. All
operations (push and pop) occur at the "top" of the stack, meaning the
last item placed on the stack is the first one retrieved.


Question 7
Which statement best describes a queue data structure?
A) It is a sequence of elements in which insertion and deletion take
place at one end
B) It is a sequence of elements in which insertion and deletion take
place at both ends
C) It is a sequence of elements where insertion can take place anywhere
but deletion is at the front
D) It is a sequence of elements where insertions take place at the back
and deletions at the front
Correct Answer: D) It is a sequence of elements where insertions take
place at the back and deletions at the front
Rationale: A queue follows the First-In, First-Out (FIFO) principle. This
means the first element added to the structure (at the back/rear) is the
first one to be removed (from the front).


Question 8
Which data structure allows for the insertion and deletion of data
elements at both the front and the rear ends?

Document information

Uploaded on
August 15, 2026
Number of pages
98
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
$17.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
maingirose
4.3
(4)
Sold
27
Followers
0
Items
1921
Last sold
1 week ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions