Recall & Review
beginner
What is the main idea behind the Merge Sort algorithm?
Merge Sort works by dividing the list into smaller parts, sorting each part, and then merging 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 of Merge Sort is O(n log n) for both average and worst cases, where n is the number of elements to sort.
Click to reveal answer
intermediate
Why is Merge Sort considered a stable sorting algorithm?
Merge Sort is stable because it keeps the original order of equal elements when merging the sorted parts.
Click to reveal answer
beginner
Show the basic steps of Merge Sort on the array [4, 1, 3, 2].
Step 1: Divide into [4,1] and [3,2]<br>Step 2: Divide further to [4], [1], [3], [2]<br>Step 3: Merge [4] and [1] to get [1,4]<br>Step 4: Merge [3] and [2] to get [2,3]<br>Step 5: Merge [1,4] and [2,3] to get [1,2,3,4]
Click to reveal answer
intermediate
What is the space complexity of Merge Sort and why?
Merge Sort has a space complexity of O(n) because it requires extra space to hold the temporary arrays during the merge process.
Click to reveal answer
What technique does Merge Sort use to sort an array?
✗ Incorrect
Merge Sort divides the array into smaller parts, sorts them, and merges them back, which is the divide and conquer technique.
Which of the following is true about Merge Sort?
✗ Incorrect
Merge Sort is stable because it preserves the order of equal elements during merging.
What is the first step in the Merge Sort algorithm?
✗ Incorrect
Merge Sort starts by dividing the array into two halves recursively.
How does Merge Sort combine the divided parts?
✗ Incorrect
Merge Sort merges the sorted subarrays to form a fully sorted array.
What is the space complexity of Merge Sort?
✗ Incorrect
Merge Sort requires extra space proportional to the size of the array for merging, so space complexity is O(n).
Explain how Merge Sort sorts an array step-by-step.
Think about breaking the problem into smaller pieces and then combining them.
You got /4 concepts.
Describe the advantages and disadvantages of using Merge Sort.
Consider speed, memory use, and stability.
You got /4 concepts.