cormen Dp 4 begginners

i strtd DP by CLRS, and realized that reading wasnt really teaching me, so i looked on web for direct problems(rod cutting, matrix chain multiplication), which are illustrated in CLRS, but could’nt find even one, so i decided to code em up on myslef, for the time being iv just workd on rod cutting prob (both bottom up and top down approach), ill keep updating the post as soon as i get to solve newer problems…
anyone who finds a bug is welcome to post
thanx…:slight_smile:

ROD CUTTING :
TOP DOWN : http://ideone.com/uqF87G
BOTTOM UP : http://ideone.com/2LfUUz

MATRIX CHAIN MULTIPLICATION : http://ideone.com/aNfWgp (problem : http://www.spoj.com/problems/MIXTURES/)

2 Likes

http://www.ahmed-aly.com/Category.jsp?ID=33 .This is a link for dp problems.
https://www.hackerrank.com/domains/algorithms/dynamic-programming This is another.
http://www.geeksforgeeks.org/tag/dynamic-programming/ And you can try making all these codes in ur own way for practice.

1 Like