C++ easy solution
\nclass Solution {\npublic:\n    int findPairs(vector<int>& nums, int k) {\n        map<pair<int, int>, int> m;\n        for(int i=0;i<nums.size();i++){\n      
```\nclass Solution {\npublic:\n    int findPairs(vector<int>& nums, int k) {\n        map<pair<int, int>, int> m;\n        for(int i=0;i<nums.size();i++){\n            for(int j=i+1;j<nums.size();j++){\n                if(abs(nums[i]-nums[j])==k and m.find({nums[j], nums[i]})==m.end())\n                    m[{nums[i], nums[j]}]++;\n            }\n        }\n        return m.size();\n    }\n};\n```
['C', 'C++']