improve 2 solutions
add minimum path sum for matrix