Merge sort
Lesson 7 of 20 · Algo.Micro
Split the list in halves, sort each half, merge the sorted halves.
A list of one item is already sorted. So: split the list in two, sort each half (the same way, recursively), then combine. The dashed line shows each split.
Check yourself
What does merge sort do after sorting both halves?
Do it in the browser: a real algorithms tool, a short mission and instant feedback. No install.
Start this lesson — free