Added udacity style dynamic programming script