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.

0 0 votes
Article Rating
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x