Two sum||C++||Java ||4 lines solution||Sorting
\n\n# Code\nJAVA solution \n\nclass Solution {\n    public int findMaxK(int[] nums) {\n        Arrays.sort(nums);\n         for(int i=0;i<nums.length;i++)\n    
\n\n# Code\nJAVA solution \n```\nclass Solution {\n    public int findMaxK(int[] nums) {\n        Arrays.sort(nums);\n         for(int i=0;i<nums.length;i++)\n            for(int j=nums.length-1;j>=0;j--)\n                if(nums[i]+nums[j]==0) return nums[j];\n        return -1;\n    }\n}\n```\nC++ solution \n```\nclass Solution {\npublic:\n    int findMaxK(vector<int>& nums) {\n        sort(nums.begin(),nums.end());\n        for(int i=0;i<nums.size();i++)\n            for(int j=nums.size()-1;j>=0;j--)\n                if(nums[i]+nums[j]==0) return nums[j];\n        return -1;\n    }\n};\n```
['Sorting', 'C++', 'Java']