Skip to content

Latest commit

 

History

History
16 lines (8 loc) · 646 Bytes

dynamicProgramming.md

File metadata and controls

16 lines (8 loc) · 646 Bytes

Dynamic programming

Dynamic programming is a way to break down optimization problems into simpler sub-problems, and storing their result so they are solved only once. To always remember answers to sub-problems you've already solved.

One algorithm for dynamic programming is memoization.

Top down dynamic programming:

Start with the large, complex problem and break it down into smaller sub-problems, memoizing the problem into parts.

Bottom up dynamic programming:

Starts with the smallest possible subproblem, figures out a solution to them and then slowly builds itself up to solve larger, more complicated subproblems.