Simple C++ solution | O(n) |2 pointer simple approach
```\nclass Solution {\npublic:\n    int findMaxK(vector& nums) {\n        sort(nums.begin(),nums.end());\n        int s=0,e=nums.size()-1;\n        while(s<e){\
```\nclass Solution {\npublic:\n    int findMaxK(vector<int>& nums) {\n        sort(nums.begin(),nums.end());\n        int s=0,e=nums.size()-1;\n        while(s<e){\n            if(nums[s]+nums[e]==0)\n                return nums[e];\n            else if(nums[s]+nums[e]<0)s++;\n            else\n                e--;\n        }\n        return -1;\n    }\n};
['C']