Easy to Understand | C++
\nclass Solution {\npublic:\n    int findMaxK(vector<int>& nums) {\n        map<int, set<int>> mp;\n        for(auto &it: nums) {\n            mp[abs(it)].inser
```\nclass Solution {\npublic:\n    int findMaxK(vector<int>& nums) {\n        map<int, set<int>> mp;\n        for(auto &it: nums) {\n            mp[abs(it)].insert(it);\n        }\n        int maxi = INT_MIN;\n        \n        for(auto &it: mp) {\n            if(it.second.size() == 2) {\n                maxi = max(it.first, maxi);\n            }\n        }\n        return maxi == INT_MIN ? -1 : maxi;\n    }\n};\n```\n\n
['C']