Sorting, Explained Like You're Five: Merge Sort
Imagine you and a friend each have a small, already-sorted stack of cards. How fast can you combine them into one sorted stack? Easy: keep comparing the top card of each stack and taking the smaller one. That tiny "merge" move is the entire secret of merge sort.
The whole idea in one sentence
Keep splitting the pile in half until every pile has just one card — and a single card is always "sorted" — then merge the little piles back together two at a time.
Splitting is the easy half. The clever half is the merge: because the two halves are already sorted, you only ever look at the front card of each.
Watch it happen
Hit Play. The dim bars are the parts we're ignoring for a moment; the lit window is the chunk we're splitting or merging right now. Watch it break all the way down, then rebuild itself in order.
Why interviewers like it
Merge sort is the friendly face of divide and conquer — the idea of breaking a big problem into smaller copies of itself. It's reliably fast (O(n log n) every time, no bad luck), and it's the gateway to recursion clicking in your head. If you can explain the merge step out loud, you understand the algorithm.
Splitting is trivial. The magic is that merging two already sorted halves only ever needs the front of each pile.