Divide and conquer solves problems by recursively splitting them into smaller subproblems of the same type, solving each independently, and combining results. The paradigm has three phases: divide (split the problem), conquer (solve recursively), and combine (merge results). The Master Theorem provides a closed-form solution for recurrences of the form T(n) = aT(n/b) + f(n), covering most divide-and-conquer algorithms. Classic applications include merge sort, quicksort, and Strassen's matrix multiplication.
Use merge sort as the canonical example. Explicitly draw the recursion tree for small inputs and verify that the work at each level sums to the predicted total. Practice applying the Master Theorem to derive complexity from recurrences.
You know recursion: a function that solves a problem by calling itself on smaller inputs until hitting a base case. Divide and conquer is a specific pattern of recursion with three distinct phases. First, divide the problem into smaller subproblems of the same type. Second, conquer each subproblem by solving it recursively (or directly if it's small enough). Third, combine the subproblem solutions into a solution for the original problem. The key requirement is that the subproblems are *independent* — solving one does not depend on the result of another. This independence is what distinguishes divide and conquer from dynamic programming, where subproblems overlap and share dependencies.
Merge sort is the clearest example to build intuition from. Given an unsorted array, divide it into two halves. Recursively sort each half (conquer). Then merge the two sorted halves into a single sorted array (combine). The merge step walks through both halves simultaneously, always picking the smaller element, producing a sorted result in O(n) time. The key insight is that the hard work happens in the *combine* step, not the divide step — splitting an array in half is trivial, but merging two sorted arrays is where the useful computation occurs. This is common in divide-and-conquer algorithms: the divide step is often simple, and the algorithm's character is defined by how it combines results.
Binary search, which you already know, is actually a degenerate case of divide and conquer where you only recurse on *one* subproblem (the half that might contain your target) and the combine step is trivial (just return the result). This is called decrease and conquer by some authors. True divide and conquer recurses on *all* subproblems. This distinction matters for understanding time complexity: binary search does O(1) work per level with one branch (giving O(log n) total), while merge sort does O(n) work per level with two branches (giving O(n log n) total).
The Master Theorem gives you a shortcut for analyzing divide-and-conquer recurrences of the form T(n) = aT(n/b) + f(n), where *a* is the number of subproblems, *n/b* is each subproblem's size, and f(n) is the cost of dividing and combining. The theorem compares f(n) to n^(log_b(a)): if the divide/combine work grows slower than the recursive branching, the leaves dominate; if it grows faster, the root dominates; if they match, you get a log factor. For merge sort, a = 2, b = 2, f(n) = O(n), and n^(log₂2) = n, so T(n) = O(n log n). Once you internalize this framework, you can analyze any divide-and-conquer algorithm's complexity by simply identifying a, b, and f(n) and checking which case applies.