C++ | 2 Pointers | Easy
\nclass Solution {\npublic:\n    int findMaxK(vector<int>& nums) {\n        sort(nums.begin(), nums.end());\n        \n        int l = 0;\n        int r = nums.
```\nclass Solution {\npublic:\n    int findMaxK(vector<int>& nums) {\n        sort(nums.begin(), nums.end());\n        \n        int l = 0;\n        int r = nums.size() - 1;\n        \n        while(l < r){\n            if(nums[l]*-1 == nums[r]){\n                return nums[r];\n            } else if (nums[l]*-1 < nums[r]){\n                r--;\n            } else {\n                l++;\n            }\n        }\n        return -1;\n    }\n};\n```
['Two Pointers', 'C']