Count Distinct Pairs With Given Sum Leetcode Javascript 30