Base120 · Decomposition
Partition-and-Conquer
Divide problem into independent subproblems solvable separately then combined
When to use
"Use when a problem can be divided into independent subproblems. Solve each subproblem separately, then combine the solutions. Reduces complexity by decomposing a hard problem into easier ones."
Example
"Merge sort divides an array into two halves, recursively sorts each half, then merges the sorted halves. Each subproblem (sorting a smaller array) is easier than the original. The combination (merging two sorted arrays) is efficient."
Common misuse
"Dividing into subproblems that are not independent. If the subproblems interact, the combination step becomes as complex as the original problem, and the decomposition adds overhead without benefit."