solution: minimum path sum 1 -> dp