Tag Archives: Dynamic Programming

Examples of Dynamic Programming with C++ and Matlab

In this tutorial, I will give you examples of using dynamic programming for solving the following problems:

1)Minimum number of coins for summing X.


2)The most (least) costly path on a grid (dynamic time warping).


3)Levenshtein edit distance.


4)Seam Carving. I have written a tutorial on that here and the recursive part is in the following lines:


The examples are taken from “Competitive Programmer’s Handbook” written by Antti Laaksonen.