Divide and conquer solves a problem by (1) dividing it into smaller subproblems, (2) conquering each recursively, and (3) combining the results. Many efficient algorithms follow this template.
The idea
If subproblems are independent and shrink quickly, the total work follows a recurrence you can analyze with the Master Theorem.
Example: max element via divide and conquer
():
lo == hi:
arr[lo]
mid = (lo + hi) //
left = max_dc(arr, lo, mid)
right = max_dc(arr, mid + , hi)
(left, right)
max_dc([, , , ], , )
