Q. In which scenario would you prefer Merge Sort over Quick Sort?
-
A.
When memory usage is a concern
-
B.
When sorting linked lists
-
C.
When the dataset is small
-
D.
When the data is mostly sorted
Solution
Merge Sort is preferred for linked lists because it can be implemented without additional space for arrays.
Correct Answer:
B
— When sorting linked lists
Learn More →
Q. Which sorting algorithm is best suited for partially sorted data?
-
A.
Bubble Sort
-
B.
Insertion Sort
-
C.
Quick Sort
-
D.
Heap Sort
Solution
Insertion Sort is best suited for partially sorted data as it can take advantage of the existing order.
Correct Answer:
B
— Insertion Sort
Learn More →
Showing 1 to 2 of 2 (1 Pages)