Sum Of Subsets Problem Leetcode Javascript