Minimum Sum Partition Leetcode Python Easy