Maximum Sum Increasing Subsequence Leetcode Javascript Problems