MCQ Collection
Data Structures MCQs
Practice Data Structures questions with answers and explanations.
Choose an option to check your answer.
A.
Quadratic Probing
B.
Hash Table
C.
Max-Heap
D.
Merge Sort
Show Answer
Correct Answer: A. Quadratic Probing
Explanation:
Quadratic Probing is an open-addressing method that uses quadratic offsets while probing.
This description distinguishes it from the other choices.
Choose an option to check your answer.
A.
keeping union-find trees short
B.
reducing primary clustering compared with linear probing
C.
shortest paths in unweighted graphs
D.
hash tables with flexible load factors
Show Answer
Correct Answer: B. reducing primary clustering compared with linear probing
Explanation:
Quadratic Probing is commonly used for reducing primary clustering compared with linear probing.
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.
each node stores two links
C.
the probe gaps grow quadratically
D.
the minimum element is stored at the root
Show Answer
Correct Answer: C. the probe gaps grow quadratically
Explanation:
The defining property is that the probe gaps grow quadratically.
The other statements describe different structures or concepts.
Choose an option to check your answer.
A.
Suffix Array
B.
Disjoint Set Union
C.
Undirected Graph
D.
Quadratic Probing
Show Answer
Correct Answer: D. Quadratic Probing
Explanation:
Quadratic Probing fits because it supports reducing primary clustering compared with linear probing and the probe gaps grow quadratically.
Both clues point to this choice.
Choose an option to check your answer.
A.
Double Hashing
B.
Deque
C.
Undirected Graph
D.
Union by Rank
Show Answer
Correct Answer: A. Double Hashing
Explanation:
Double Hashing is an open-addressing method that uses a second hash function as the probe step.
This description distinguishes it from the other choices.
Choose an option to check your answer.
A.
connectivity queries and Kruskal's algorithm
B.
simple hash-table implementations
C.
fast pattern matching
D.
reducing primary clustering compared with linear probing
Show Answer
Correct Answer: B. simple hash-table implementations
Explanation:
Linear Probing is commonly used for simple hash-table implementations.
Its design supports this task efficiently or naturally.
Choose an option to check your answer.
A.
an edge from u to v need not imply an edge from v to u
B.
leaf nodes are commonly linked for sequential access
C.
it can suffer from primary clustering
D.
every level is completely filled
Show Answer
Correct Answer: C. it can suffer from primary clustering
Explanation:
The defining property is that it can suffer from primary clustering.
The other statements describe different structures or concepts.
Choose an option to check your answer.
A.
Open Addressing
B.
Stack
C.
Segment Tree
D.
Binomial Heap
Show Answer
Correct Answer: A. Open Addressing
Explanation:
Open Addressing is a collision-resolution method that stores all entries directly in the table array.
This description distinguishes it from the other choices.
Choose an option to check your answer.
A.
reducing primary clustering compared with linear probing
B.
cache-friendly hash tables
C.
analyzing balanced full trees
D.
range queries with point or range updates
Show Answer
Correct Answer: B. cache-friendly hash tables
Explanation:
Open Addressing is commonly used for cache-friendly hash tables.
Its design supports this task efficiently or naturally.
Choose an option to check your answer.
A.
it reuses blocks instead of requesting each one separately from the system
B.
it can support pattern search in time proportional to the pattern length
C.
probing searches for another available slot
D.
a node can store multiple keys and have multiple children
Show Answer
Correct Answer: C. probing searches for another available slot
Explanation:
The defining property is that probing searches for another available slot.
The other statements describe different structures or concepts.
Choose an option to check your answer.
A.
Linear Probing
B.
B+ Tree
C.
Radix Tree
D.
Open Addressing
Show Answer
Correct Answer: D. Open Addressing
Explanation:
Open Addressing fits because it supports cache-friendly hash tables and probing searches for another available slot.
Both clues point to this choice.
Choose an option to check your answer.
A.
Linear Probing
B.
Suffix Tree
C.
Doubly Linked List
D.
Radix Tree
Show Answer
Correct Answer: A. Linear Probing
Explanation:
Linear Probing is an open-addressing method that checks consecutive slots after a collision.
This description distinguishes it from the other choices.