We use analytics and advertising cookies to understand how the site is used and whether our ads on Facebook and Instagram work. They are set only if you accept. See our Privacy Policy for details.
Merge sort is the archetype: split, recurse, and do the real work in the merge step. The pattern shows up in median-of-two-sorted-arrays and in counting inversions, where the combine step answers the actual question. When a problem demands better than O(n²) and sorting alone does not get you there, this is usually the route.
A problem that halves cleanly, or a required O(log n) / O(n log n) bound.
6 problems. Each one runs in an in-browser editor against real test cases, with hints and a worked solution.
The patterns cheat sheet covers all of these in one page - what each one looks like in a problem statement, and the template that follows.