Q. In which scenario is Quick Sort generally faster than Merge Sort?
-
A.
When the array is small
-
B.
When the array is large
-
C.
When the array is nearly sorted
-
D.
When the array is reverse sorted
Solution
Quick Sort is generally faster than Merge Sort when the array is nearly sorted.
Correct Answer:
C
— When the array is nearly sorted
Learn More →
Q. What is the primary advantage of using Merge Sort over Quick Sort?
-
A.
Faster for small datasets
-
B.
Stable sorting
-
C.
In-place sorting
-
D.
Less memory usage
Solution
The primary advantage of Merge Sort is that it is a stable sorting algorithm.
Correct Answer:
B
— Stable sorting
Learn More →
Q. Which of the following is a characteristic of Quick Sort?
-
A.
Always stable
-
B.
In-place sorting
-
C.
Worst-case O(n log n)
-
D.
Uses extra space
Solution
Quick Sort is an in-place sorting algorithm.
Correct Answer:
B
— In-place sorting
Learn More →
Q. Which sorting algorithm is based on the divide and conquer strategy?
-
A.
Bubble Sort
-
B.
Insertion Sort
-
C.
Merge Sort
-
D.
Selection Sort
Solution
Merge Sort is based on the divide and conquer strategy.
Correct Answer:
C
— Merge Sort
Learn More →
Q. Which sorting algorithm uses a binary heap data structure?
-
A.
Quick Sort
-
B.
Merge Sort
-
C.
Heap Sort
-
D.
Insertion Sort
Solution
Heap Sort uses a binary heap data structure.
Correct Answer:
C
— Heap Sort
Learn More →
Showing 1 to 5 of 5 (1 Pages)