DSA MIDTERMS (SORTING) Flashcards
1
Q
What type of algorithm is Merge Sort?
A
Divide-and-conquer
2
Q
What is the time complexity of Merge Sort?
A
O(n log n)
3
Q
What is the primary advantage of Merge Sort over simpler sorting algorithms?
A
Consistent performance
4
Q
What is the space complexity of Merge Sort?
A
O(n)
5
Q
Is Merge Sort a stable sorting algorithm?
A
TRUE
6
Q
Does Merge Sort require additional memory?
A
TRUE
7
Q
Is Merge Sort faster than Bubble Sort for large datasets?
A
TRUE
8
Q
Can Merge Sort be parallelized?
A
TRUE
9
Q
What is the base case for the recursive division in Merge Sort?
A
Single element
10
Q
Is Merge Sort efficient for small datasets?
A
TRUE
11
Q
What is the value of the root in Max Heap Sort?
A
Largest
12
Q
What would be the order of a sorted Max Heap Sort?
A
Ascending
13
Q
A