DSA MIDTERMS (SORTING) Flashcards

1
Q

What type of algorithm is Merge Sort?

A

Divide-and-conquer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the time complexity of Merge Sort?

A

O(n log n)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the primary advantage of Merge Sort over simpler sorting algorithms?

A

Consistent performance

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the space complexity of Merge Sort?

A

O(n)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Is Merge Sort a stable sorting algorithm?

A

TRUE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Does Merge Sort require additional memory?

A

TRUE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Is Merge Sort faster than Bubble Sort for large datasets?

A

TRUE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Can Merge Sort be parallelized?

A

TRUE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the base case for the recursive division in Merge Sort?

A

Single element

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Is Merge Sort efficient for small datasets?

A

TRUE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the value of the root in Max Heap Sort?

A

Largest

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What would be the order of a sorted Max Heap Sort?

A

Ascending

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly