MCQ Collection
Data Structures MCQs
Practice Data Structures questions with answers and explanations.
Choose an option to check your answer.
A.
Min-Heap
B.
AVL Tree
C.
Adjacency List
D.
Merge Sort
Show Answer
Correct Answer: A. Min-Heap
Explanation:
Min-Heap is a heap in which every parent key is no greater than its children's keys.
This description distinguishes it from the other choices.
Choose an option to check your answer.
A.
representing hierarchical binary relationships
B.
memory-efficient prefix indexing
C.
repeatedly retrieving the smallest element
D.
sliding-window algorithms
Show Answer
Correct Answer: B. memory-efficient prefix indexing
Explanation:
Radix Tree is commonly used for memory-efficient prefix indexing.
Its design supports this task efficiently or naturally.
Choose an option to check your answer.
A.
both front and rear operations can be efficient
B.
it can suffer from primary clustering
C.
an edge may represent a string rather than one character
D.
suffixes are ordered lexicographically
Show Answer
Correct Answer: C. an edge may represent a string rather than one character
Explanation:
The defining property is that an edge may represent a string rather than one character.
The other statements describe different structures or concepts.
Choose an option to check your answer.
A.
Binary Search Tree
B.
Garbage Collection
C.
Quadratic Probing
D.
Radix Tree
Show Answer
Correct Answer: D. Radix Tree
Explanation:
Radix Tree fits because it supports memory-efficient prefix indexing and an edge may represent a string rather than one character.
Both clues point to this choice.
Choose an option to check your answer.
A.
Heap
B.
Stack
C.
Binary Tree
D.
Binary Search
Show Answer
Correct Answer: A. Heap
Explanation:
Heap is a complete tree-based structure satisfying a heap-order property.
This description distinguishes it from the other choices.
Choose an option to check your answer.
A.
memory management in managed runtimes
B.
priority queue implementation
C.
explaining occasional expensive dynamic-array operations
D.
cycle detection, topological reasoning, and connectivity
Show Answer
Correct Answer: B. priority queue implementation
Explanation:
Heap is commonly used for priority queue implementation.
Its design supports this task efficiently or naturally.
Choose an option to check your answer.
A.
edges may be directed or undirected
B.
it provides excellent amortized decrease-key performance
C.
only the root is guaranteed to contain the global minimum or maximum
D.
it typically uses recursion or a stack
Show Answer
Correct Answer: C. only the root is guaranteed to contain the global minimum or maximum
Explanation:
The defining property is that only the root is guaranteed to contain the global minimum or maximum.
The other statements describe different structures or concepts.
Choose an option to check your answer.
A.
ordered dictionary operations with expected logarithmic time
B.
database range queries
C.
fast random access when the index is known
D.
quickly rejecting items that are definitely absent
Show Answer
Correct Answer: B. database range queries
Explanation:
B+ Tree is commonly used for database range queries.
Its design supports this task efficiently or naturally.
Choose an option to check your answer.
A.
edges may be directed or undirected
B.
its merge step usually needs auxiliary storage for arrays
C.
leaf nodes are commonly linked for sequential access
D.
path quality can depend on the sum of weights
Show Answer
Correct Answer: C. leaf nodes are commonly linked for sequential access
Explanation:
The defining property is that leaf nodes are commonly linked for sequential access.
The other statements describe different structures or concepts.
Choose an option to check your answer.
A.
Linear Search
B.
Memory Pool
C.
Radix Sort
D.
B+ Tree
Show Answer
Correct Answer: D. B+ Tree
Explanation:
B+ Tree fits because it supports database range queries and leaf nodes are commonly linked for sequential access.
Both clues point to this choice.
Choose an option to check your answer.
A.
Trie
B.
B-Tree
C.
Max-Heap
D.
Adjacency Matrix
Show Answer
Correct Answer: A. Trie
Explanation:
Trie is a tree that stores keys by sharing common prefixes.
This description distinguishes it from the other choices.
Choose an option to check your answer.
A.
fast average-case dictionary operations
B.
prefix search and autocomplete
C.
fixed-size buffering
D.
expressing a guaranteed minimum growth rate
Show Answer
Correct Answer: B. prefix search and autocomplete
Explanation:
Trie is commonly used for prefix search and autocomplete.
Its design supports this task efficiently or naturally.