Dynamic programming

Solve a problem by writing it as a recurrence over smaller states and storing each state once, either top-down with a cache or bottom-up by filling a table.

Back to the glossary