Update minPathSum