Dynamic programming
Merge pull request #26 from Meng-Gen/problem-189

Dynamic programming