Plays from YouTube. Watch on YouTube
How can splitting a problem make an algorithm dramatically faster?
Meet Divide and Conquer: the strategy that connects efficient sorting, computational geometry, and fast multiplication.
We start with counting inversions. A naive comparison checks every pair; a merge-based algorithm counts crossing pairs during sorting, reducing the running time from quadratic to O(n log n).
From there, we build recursion trees and derive the Master Theorem, learning how the number of subproblems and the combine cost determine the total work.
Then we solve the closest-pair problem in the plane. We split the points, restrict attention to a narrow strip, and use a geometric packing argument to avoid comparing every crossing pair.
Finally, we unpack Karatsuba multiplication. Three half-size products, instead of four, lower the asymptotic exponent and we compute a complete numerical example.
The big idea: Divide and conquer becomes powerful when the recursive answers contain exactly the structure needed for an inexpensive and provably correct combine step.
Algorithms explained visually, one concept at a time.