Count Subsets With Given Difference Leetcode Javascript Solution