code/dynamic_programming at master · mdoroudi/code · GitHub
Skip to content

Latest commit

 

History

History

Folders and files

README.md

Dynamic Programming

Dynamic programming is an algorithm technique which is usually based on:

  • recurrent formula
  • one or more starting states

A sub-solution of the problem is constructed from previously found ones, which starts from the starting states. DP solutions have a polynomial complexity where the brute-force or backtracking solutions usually have exponantial solutions. DP computes the recurrence efficiently because it stores (memoized) the sub-probelms and use the results instead of recalculating them everytime.

Examples

These are the examples implemented in this project: The resources used are the following TopCoder and [The Algorithm Design Manual](http://www. algorist.com/)