Minimum Sum Partition Leetcode Playground Python