Recall & Review
beginner
What is the main idea behind the Merge Sort algorithm?
Merge Sort divides the list into smaller parts, sorts each part, and then merges them back together in order.
Click to reveal answer
intermediate
What is the time complexity of Merge Sort in the average and worst cases?
The time complexity is O(n log n) for both average and worst cases, where n is the number of elements.
Click to reveal answer
intermediate
Why does Merge Sort use extra space?
Merge Sort uses extra space because it creates temporary arrays to hold sorted parts before merging them.
Click to reveal answer
beginner
Show the result of merging two sorted arrays: [1, 4, 7] and [2, 3, 6].
The merged sorted array is [1, 2, 3, 4, 6, 7].
Click to reveal answer
beginner
What are the two main steps in the Merge Sort algorithm?
1. Divide the array into halves until each part has one element.<br>2. Merge the parts back together in sorted order.
Click to reveal answer
What technique does Merge Sort use to sort data?
✗ Incorrect
Merge Sort splits the array into smaller parts and conquers by merging them sorted.
What is the space complexity of Merge Sort?
✗ Incorrect
Merge Sort requires extra space proportional to the size of the array for merging.
Which of these is NOT true about Merge Sort?
✗ Incorrect
Merge Sort needs extra space and does not sort in place.
After dividing an array of 8 elements, how many single-element parts do you get?
✗ Incorrect
Dividing continues until each part has one element, so 8 elements become 8 parts.
What is the first step in the Merge Sort algorithm?
✗ Incorrect
Merge Sort starts by dividing the array into smaller halves.
Explain how the Merge Sort algorithm sorts an array step-by-step.
Think about breaking down the problem and then combining solutions.
You got /4 concepts.
Describe the advantages and disadvantages of using Merge Sort.
Consider speed, memory, and use cases.
You got /4 concepts.