MCQ Collection
Data Structures MCQs
Practice Data Structures questions with answers and explanations.
Choose an option to check your answer.
A.
Singly Linked List
B.
Array
C.
Trie
D.
Linear Search
Show Answer
Correct Answer: A. Singly Linked List
Explanation:
Singly Linked List is a sequence of nodes where each node points to the next node.
This description distinguishes it from the other choices.
Choose an option to check your answer.
A.
accelerating repeated disjoint-set queries
B.
frequent insertions at the head
C.
modeling symmetric relationships
D.
database range queries
Show Answer
Correct Answer: B. frequent insertions at the head
Explanation:
Singly Linked List is commonly used for frequent insertions at the head.
Its design supports this task efficiently or naturally.
Choose an option to check your answer.
A.
collisions must be handled when keys map to the same position
B.
it flattens the parent structure over time
C.
forward traversal is supported but direct backward traversal is not
D.
its subtrees do not become excessively skewed
Show Answer
Correct Answer: C. forward traversal is supported but direct backward traversal is not
Explanation:
The defining property is that forward traversal is supported but direct backward traversal is not.
The other statements describe different structures or concepts.
Choose an option to check your answer.
A.
Complete Binary Tree
B.
Skip List
C.
Perfect Binary Tree
D.
Singly Linked List
Show Answer
Correct Answer: D. Singly Linked List
Explanation:
Singly Linked List fits because it supports frequent insertions at the head and forward traversal is supported but direct backward traversal is not.
Both clues point to this choice.
Choose an option to check your answer.
A.
Doubly Linked List
B.
Segment Tree
C.
Union by Rank
D.
Graph
Show Answer
Correct Answer: A. Doubly Linked List
Explanation:
Doubly Linked List is a sequence of nodes with links to both the next and previous nodes.
This description distinguishes it from the other choices.
Choose an option to check your answer.
A.
task scheduling and buffering
B.
efficient insertion or deletion when a node reference is available
C.
stable sorting with guaranteed O(n log n) time
D.
describing both upper and lower growth rates
Show Answer
Correct Answer: B. efficient insertion or deletion when a node reference is available
Explanation:
Doubly Linked List is commonly used for efficient insertion or deletion when a node reference is available.
Its design supports this task efficiently or naturally.
Choose an option to check your answer.
A.
Array
B.
Binary Search Tree
C.
Circular Linked List
D.
Undirected Graph
Show Answer
Correct Answer: A. Array
Explanation:
Array is a contiguous collection of elements accessed by index.
This description distinguishes it from the other choices.
Choose an option to check your answer.
A.
reducing primary clustering compared with linear probing
B.
fast random access when the index is known
C.
hash tables with flexible load factors
D.
workloads with strong locality of reference
Show Answer
Correct Answer: B. fast random access when the index is known
Explanation:
Array is commonly used for fast random access when the index is known.
Its design supports this task efficiently or naturally.
Choose an option to check your answer.
A.
its subtrees do not become excessively skewed
B.
it bounds a function from below for sufficiently large inputs
C.
elements are typically stored in adjacent memory locations
D.
nodes on the last level are as far left as possible
Show Answer
Correct Answer: C. elements are typically stored in adjacent memory locations
Explanation:
The defining property is that elements are typically stored in adjacent memory locations.
The other statements describe different structures or concepts.
Choose an option to check your answer.
A.
Linear Search
B.
Stack
C.
Circular Linked List
D.
Array
Show Answer
Correct Answer: D. Array
Explanation:
Array fits because it supports fast random access when the index is known and elements are typically stored in adjacent memory locations.
Both clues point to this choice.
Choose an option to check your answer.
A.
Dynamic Array
B.
Complete Binary Tree
C.
Hash Table
D.
Open Addressing
Show Answer
Correct Answer: A. Dynamic Array
Explanation:
Dynamic Array is a resizable array that grows when its capacity is exceeded.
This description distinguishes it from the other choices.
Choose an option to check your answer.
A.
multi-key sorting
B.
maintaining an indexed sequence whose size changes
C.
round-robin scheduling
D.
reducing allocation overhead
Show Answer
Correct Answer: B. maintaining an indexed sequence whose size changes
Explanation:
Dynamic Array is commonly used for maintaining an indexed sequence whose size changes.
Its design supports this task efficiently or naturally.