solve the minimum Path Sum.