[Python] really short and easy, explained
Let complementary number be a number that is equal to some given number minus k.\nTo form at least one pair for any given number:\n  If k is greater than zero, 
Let complementary number be a number that is equal to some given number minus k.\nTo form at least one pair for any given number:\n  If k is greater than zero, we only care if count of complementary number is bigger than zero.\n  If k is zero, we only care if count of complementary number (that is the current number itself) is bigger than one.\n\nConveniently, both this cases can be expressed with k==0, that will return zero or one.\n\n```\ndef findPairs(self, nums: List[int], k: int) -> int:\n    c = collections.Counter(nums)\n    return sum(c[n-k] > (k == 0) for n in c)\n```
[]