Practice Library
All MCQs
Browse exam-wise, subject-wise, and country-wise MCQs with explanations.
Choose an option to check your answer.
A.
Linear Probing
B.
Graph
C.
LRU Cache
D.
Heap
Show Answer
Correct Answer: D. Heap
Explanation:
Heap fits because it supports priority queue implementation and only the root is guaranteed to contain the global minimum or maximum.
Both clues point to this choice.
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.
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.
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.
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.
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.
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.
Radix Tree
B.
B+ Tree
C.
Circular Queue
D.
In-Place Algorithm
Show Answer
Correct Answer: A. Radix Tree
Explanation:
Radix Tree is a compressed trie that merges chains of single-child nodes.
This description distinguishes it from the other choices.
Choose an option to check your answer.
A.
Counting Sort
B.
Stable Sorting
C.
Big-O Notation
D.
Trie
Show Answer
Correct Answer: D. Trie
Explanation:
Trie fits because it supports prefix search and autocomplete and edges typically represent characters or symbols.
Both clues point to this choice.
Choose an option to check your answer.
A.
the rear index can wrap to the beginning of the array
B.
it typically uses recursion or a stack
C.
edges typically represent characters or symbols
D.
insertion occurs at the rear and removal at the front
Show Answer
Correct Answer: C. edges typically represent characters or symbols
Explanation:
The defining property is that edges typically represent characters or symbols.
The other statements describe different structures or concepts.
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.
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.