[JAVA] easiest two pointer solution
\n\n# Code\n\nclass Solution {\n    public int findMaxK(int[] nums) {\n      Arrays.sort(nums);\n      for(int i = 0; i < nums.length; i ++) {\n          for(in
\n\n# Code\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      }  \n      return - 1;\n    }\n}\n```\n# PLEASE UPVOTE IF IT WAS HELPFULL
['Java']