MCQ Collection
Data Structures MCQs
Practice Data Structures questions with answers and explanations.
Choose an option to check your answer.
A.
Skip List
B.
Quadratic Probing
C.
Binary Tree
D.
Heap Sort
Show Answer
Correct Answer: A. Skip List
Explanation:
Skip List is a layered linked structure with probabilistic shortcuts.
This description distinguishes it from the other choices.
Choose an option to check your answer.
A.
reachability analysis helps determine which objects can be reclaimed
B.
each node stores two links
C.
index movement is based on the least significant set bit
D.
children are commonly called left and right
Show Answer
Correct Answer: C. index movement is based on the least significant set bit
Explanation:
The defining property is that index movement is based on the least significant set bit.
The other statements describe different structures or concepts.
Choose an option to check your answer.
A.
Adjacency Matrix
B.
Bloom Filter
C.
Binary Search
D.
Union by Rank
Show Answer
Correct Answer: D. Union by Rank
Explanation:
Union by Rank fits because it supports keeping union-find trees short and rank approximates tree height.
Both clues point to this choice.
Choose an option to check your answer.
A.
Segment Tree
B.
Big-Theta Notation
C.
Big-Omega Notation
D.
Hash Table
Show Answer
Correct Answer: A. Segment Tree
Explanation:
Segment Tree is a binary tree structure storing aggregate information over intervals.
This description distinguishes it from the other choices.
Choose an option to check your answer.
A.
sorting fixed-length integers or strings
B.
range queries with point or range updates
C.
fast average-case dictionary operations
D.
modeling networks, routes, and relationships
Show Answer
Correct Answer: B. range queries with point or range updates
Explanation:
Segment Tree is commonly used for range queries with point or range updates.
Its design supports this task efficiently or naturally.
Choose an option to check your answer.
A.
after each full pass, an extreme element reaches its final region
B.
each digit pass must use a stable subroutine in common LSD implementations
C.
a query can combine results from a logarithmic number of nodes
D.
each node stores two links
Show Answer
Correct Answer: C. a query can combine results from a logarithmic number of nodes
Explanation:
The defining property is that a query can combine results from a logarithmic number of nodes.
The other statements describe different structures or concepts.
Choose an option to check your answer.
A.
Bloom Filter
B.
Disjoint Set Union
C.
Suffix Array
D.
Segment Tree
Show Answer
Correct Answer: D. Segment Tree
Explanation:
Segment Tree fits because it supports range queries with point or range updates and a query can combine results from a logarithmic number of nodes.
Both clues point to this choice.
Choose an option to check your answer.
A.
Fenwick Tree
B.
Trie
C.
Quick Sort
D.
AVL Tree
Show Answer
Correct Answer: A. Fenwick Tree
Explanation:
Fenwick Tree is an indexed tree that stores partial cumulative information in an array.
This description distinguishes it from the other choices.
Choose an option to check your answer.
A.
describing both upper and lower growth rates
B.
prefix sums with updates
C.
efficient insertion or deletion when a node reference is available
D.
bounded caching with temporal locality
Show Answer
Correct Answer: B. prefix sums with updates
Explanation:
Fenwick Tree is commonly used for prefix sums with updates.
Its design supports this task efficiently or naturally.
Choose an option to check your answer.
A.
Path Compression
B.
Separate Chaining
C.
Bloom Filter
D.
B-Tree
Show Answer
Correct Answer: A. Path Compression
Explanation:
Path Compression is an optimization that makes nodes on a find path point closer to the set representative.
This description distinguishes it from the other choices.
Choose an option to check your answer.
A.
algorithms with many decrease-key operations
B.
accelerating repeated disjoint-set queries
C.
sliding-window algorithms
D.
finding an item in sorted random-access data
Show Answer
Correct Answer: B. accelerating repeated disjoint-set queries
Explanation:
Path Compression is commonly used for accelerating repeated disjoint-set queries.
Its design supports this task efficiently or naturally.
Choose an option to check your answer.
A.
it can support pattern search in time proportional to the pattern length
B.
it exists only for directed acyclic graphs
C.
it flattens the parent structure over time
D.
it bounds a function from below for sufficiently large inputs
Show Answer
Correct Answer: C. it flattens the parent structure over time
Explanation:
The defining property is that it flattens the parent structure over time.
The other statements describe different structures or concepts.