Practice Library
All MCQs
Browse exam-wise, subject-wise, and country-wise MCQs with explanations.
Choose an option to check your answer.
A.
Directed Graph
B.
Big-O Notation
C.
Undirected Graph
D.
Merge Sort
Show Answer
Correct Answer: D. Merge Sort
Explanation:
Merge Sort fits because it supports stable sorting with guaranteed O(n log n) time and its merge step usually needs auxiliary storage for arrays.
Both clues point to this choice.
Choose an option to check your answer.
A.
the minimum element is stored at the root
B.
it provides excellent amortized decrease-key performance
C.
its merge step usually needs auxiliary storage for arrays
D.
its running time depends on both item count and key range
Show Answer
Correct Answer: C. its merge step usually needs auxiliary storage for arrays
Explanation:
The defining property is that its merge step usually needs auxiliary storage for arrays.
The other statements describe different structures or concepts.
Choose an option to check your answer.
A.
ordered searching and dynamic set operations
B.
stable sorting with guaranteed O(n log n) time
C.
describing both upper and lower growth rates
D.
priority queue implementation
Show Answer
Correct Answer: B. stable sorting with guaranteed O(n log n) time
Explanation:
Merge Sort is commonly used for stable sorting with guaranteed O(n log n) time.
Its design supports this task efficiently or naturally.
Choose an option to check your answer.
A.
Merge Sort
B.
Binary Search Tree
C.
Min-Heap
D.
Breadth-First Search
Show Answer
Correct Answer: A. Merge Sort
Explanation:
Merge Sort is a divide-and-conquer sort that merges sorted subarrays.
This description distinguishes it from the other choices.
Choose an option to check your answer.
A.
Adjacency List
B.
Quadratic Probing
C.
Separate Chaining
D.
Insertion Sort
Show Answer
Correct Answer: D. Insertion Sort
Explanation:
Insertion Sort fits because it supports small or nearly sorted datasets and it is adaptive to existing order.
Both clues point to this choice.
Choose an option to check your answer.
A.
rank approximates tree height
B.
its merge step usually needs auxiliary storage for arrays
C.
it is adaptive to existing order
D.
edges may be directed or undirected
Show Answer
Correct Answer: C. it is adaptive to existing order
Explanation:
The defining property is that it is adaptive to existing order.
The other statements describe different structures or concepts.
Choose an option to check your answer.
A.
finding an item in sorted random-access data
B.
small or nearly sorted datasets
C.
tracking return addresses and local state
D.
scheduling tasks with dependencies
Show Answer
Correct Answer: B. small or nearly sorted datasets
Explanation:
Insertion Sort is commonly used for small or nearly sorted datasets.
Its design supports this task efficiently or naturally.
Choose an option to check your answer.
A.
Insertion Sort
B.
Recursion Stack
C.
Big-O Notation
D.
Path Compression
Show Answer
Correct Answer: A. Insertion Sort
Explanation:
Insertion Sort is a comparison sort that inserts each new element into a sorted prefix.
This description distinguishes it from the other choices.
Choose an option to check your answer.
A.
Adjacency List
B.
Fenwick Tree
C.
Heap Sort
D.
Selection Sort
Show Answer
Correct Answer: D. Selection Sort
Explanation:
Selection Sort fits because it supports sorting when minimizing swaps is useful and it performs a linear scan to choose each next position.
Both clues point to this choice.
Choose an option to check your answer.
A.
collisions must be handled when keys map to the same position
B.
it is commonly implemented using a hash map plus a doubly linked list
C.
it performs a linear scan to choose each next position
D.
it can suffer from primary clustering
Show Answer
Correct Answer: C. it performs a linear scan to choose each next position
Explanation:
The defining property is that it performs a linear scan to choose each next position.
The other statements describe different structures or concepts.
Choose an option to check your answer.
A.
frequent insertions at the head
B.
sorting when minimizing swaps is useful
C.
reasoning about strictly binary branching structures
D.
shortest-path and network optimization problems
Show Answer
Correct Answer: B. sorting when minimizing swaps is useful
Explanation:
Selection Sort is commonly used for sorting when minimizing swaps is useful.
Its design supports this task efficiently or naturally.
Choose an option to check your answer.
A.
Selection Sort
B.
Heap Sort
C.
Radix Sort
D.
Insertion Sort
Show Answer
Correct Answer: A. Selection Sort
Explanation:
Selection Sort is a comparison sort that repeatedly selects the smallest remaining element.
This description distinguishes it from the other choices.