Divide & Conquer
Divide and conquer splits a problem into independent subproblems, solves each recursively, and merges the results — the structure behind merge sort, quickselect, and many O(n log n) algorithms. Use it when a problem cleanly halves and the merge is cheaper than brute force.
4 LeetCode problems solved with the Divide & Conquer pattern. Practice them with spaced repetition so the pattern sticks.
- Construct Quad TreeMEDIUM · O(n^2 log n)
- Convert Sorted Array to Binary Search TreeEASY · O(n)
- Pow(x, n)MEDIUM · O(log n)
- Sort ListMEDIUM · O(n log n)
See the full solution
The complete approach, reference solutions in 5 languages, and a step-by-step visualization — then add this problem to your spaced-repetition schedule.
Start free →