add dynamic programming code to the minimum path sum problem