C++ simple soln || Hashing || Beats - 99%, 99%
```\nclass Solution {\npublic:\n    int findPairs(vector& nums, int k) {\n        unordered_map m;\n        for(int x: nums) m[x]++;\n        int ans=0;\n      
```\nclass Solution {\npublic:\n    int findPairs(vector<int>& nums, int k) {\n        unordered_map<int,int> m;\n        for(int x: nums) m[x]++;\n        int ans=0;\n        if(k==0)\n        {\n            for(auto x: m) if(x.second>1) ans++;\n        }\n        else\n        {\n            for(auto x: m)\n            {\n                if(m.count(x.first + k) > 0) ans++; \n            }\n        }\n        return ans;\n    }\n};
['C', 'C++']