Count No Of Bad Pairs Leetcode Javascript Questions