Dynamic programming applies when a larger answer can be built from smaller answers. It stores each subproblem result in a memo or table and reuses it later.
For overlapping recursions such as Fibonacci, this avoids repeated branches. A poor state definition or evaluation order can omit dependencies or waste memory.
When to use
Use it for repeated subproblems in path, sequence, and counting tasks.