Easiest 5 liner approach(please upvote if you like the solution)
Code\n\nclass Solution {\npublic:\n    int findMaxK(vector<int>& nums) {\n        sort(nums.begin(),nums.end());\n        int l=0, h=nums.size()-1;\n        whi
# Code\n```\nclass Solution {\npublic:\n    int findMaxK(vector<int>& nums) {\n        sort(nums.begin(),nums.end());\n        int l=0, h=nums.size()-1;\n        while(l < h)\n        {\n            if((nums[l] + nums[h]) == 0) return  nums[h];\n            else if((nums[l] + nums[h]) < 0) l++;\n            else h--;\n        }\n        return -1;\n    }\n};\n```
['C++']