add dynamic programming solution to min path in triange matrix