Min Path Sum Leetcode Solution 9