add dynamic programming example