Practice Library
All MCQs
Browse exam-wise, subject-wise, and country-wise MCQs with explanations.
Choose an option to check your answer.
A.
Complete Binary Tree
B.
Queue
C.
Binary Search Tree
D.
Deque
Show Answer
Correct Answer: D. Deque
Explanation:
Deque fits because it supports sliding-window algorithms and both front and rear operations can be efficient.
Both clues point to this choice.
Choose an option to check your answer.
A.
recently accessed elements become quicker to access again
B.
it avoids allocating an auxiliary structure proportional to input size
C.
both front and rear operations can be efficient
D.
performance depends on how evenly items spread across buckets
Show Answer
Correct Answer: C. both front and rear operations can be efficient
Explanation:
The defining property is that both front and rear operations can be efficient.
The other statements describe different structures or concepts.
Choose an option to check your answer.
A.
substring search and text indexing
B.
sliding-window algorithms
C.
prefix sums with updates
D.
hash tables with flexible load factors
Show Answer
Correct Answer: B. sliding-window algorithms
Explanation:
Deque is commonly used for sliding-window algorithms.
Its design supports this task efficiently or naturally.
Choose an option to check your answer.
A.
Deque
B.
Big-Theta Notation
C.
Graph
D.
Linear Search
Show Answer
Correct Answer: A. Deque
Explanation:
Deque is a double-ended queue supporting insertion and deletion at both ends.
This description distinguishes it from the other choices.
Choose an option to check your answer.
A.
Splay Tree
B.
Quadratic Probing
C.
Memory Pool
D.
Circular Queue
Show Answer
Correct Answer: D. Circular Queue
Explanation:
Circular Queue fits because it supports fixed-size buffering and the rear index can wrap to the beginning of the array.
Both clues point to this choice.
Choose an option to check your answer.
A.
its merge step usually needs auxiliary storage for arrays
B.
a node can store multiple keys and have multiple children
C.
the rear index can wrap to the beginning of the array
D.
edges may be directed or undirected
Show Answer
Correct Answer: C. the rear index can wrap to the beginning of the array
Explanation:
The defining property is that the rear index can wrap to the beginning of the array.
The other statements describe different structures or concepts.
Choose an option to check your answer.
A.
fast average-case dictionary operations
B.
fixed-size buffering
C.
uniformly distributed numeric data
D.
bounded caching with temporal locality
Show Answer
Correct Answer: B. fixed-size buffering
Explanation:
Circular Queue is commonly used for fixed-size buffering.
Its design supports this task efficiently or naturally.
Choose an option to check your answer.
A.
Circular Queue
B.
Hash Table
C.
Garbage Collection
D.
Depth-First Search
Show Answer
Correct Answer: A. Circular Queue
Explanation:
Circular Queue is a queue that reuses freed positions by wrapping indices.
This description distinguishes it from the other choices.
Choose an option to check your answer.
A.
Suffix Array
B.
Directed Graph
C.
Priority Queue
D.
Queue
Show Answer
Correct Answer: D. Queue
Explanation:
Queue fits because it supports task scheduling and buffering and insertion occurs at the rear and removal at the front.
Both clues point to this choice.
Choose an option to check your answer.
A.
probing searches for another available slot
B.
traversal can continue cyclically without reaching a null link
C.
insertion occurs at the rear and removal at the front
D.
it typically uses recursion or a stack
Show Answer
Correct Answer: C. insertion occurs at the rear and removal at the front
Explanation:
The defining property is that insertion occurs at the rear and removal at the front.
The other statements describe different structures or concepts.
Choose an option to check your answer.
A.
hash tables with flexible load factors
B.
task scheduling and buffering
C.
scheduling tasks with dependencies
D.
sliding-window algorithms
Show Answer
Correct Answer: B. task scheduling and buffering
Explanation:
Queue is commonly used for task scheduling and buffering.
Its design supports this task efficiently or naturally.
Choose an option to check your answer.
A.
Queue
B.
Skip List
C.
Directed Graph
D.
Memory Pool
Show Answer
Correct Answer: A. Queue
Explanation:
Queue is a linear structure that follows First In, First Out order.
This description distinguishes it from the other choices.