Maximum Sum Increasing Subsequence Leetcode Python