Split With Minimum Sum Leetcode Solution 1