Search the courses, subjects, tracks, games and features, or jump straight to a page.
2 cards from this section. Quick, good the night before a test.
What is merge sort?
Think about the concept of splitting and merging.
Describe the base case for merge sort.
Consider how recursion stops.
What is the time complexity of merge sort?
Think about how many times we divide the data.
True or False: Merge sort is faster than insertion sort for any given input size.
Consider their performance characteristics.
Given an array [20, 5, 23, 12, 1, 19, 3], implement merge sort and show step-by-step sorting.
Keep tracking the midpoints during splits.
Compare merge sort and quicksort for sorting a large dataset with duplicates. Which might perform better and why?
Consider how the presence of duplicates affects partitions in quicksort.
4 more questions in this section. Enroll free to practise them all.
Enroll free