🗓️ Daily LeetCoding Challenge Day 134|| 🔥 JAVA SOL
Good morning!!\n# Code\n\nclass Solution {\n    public int findMaxK(int[] nums) {\n        int[] sum = new int[1001];\n        int max = -1;\n        for (int n
Good morning!!\n# Code\n```\nclass Solution {\n    public int findMaxK(int[] nums) {\n        int[] sum = new int[1001];\n        int max = -1;\n        for (int n : nums) {\n            int index = n > 0 ? n : -n;\n            if (sum[index] != n) {\n                sum[index] += n;\n            }\n            \n            if (sum[index] == 0) {\n                max = max > index ? max : index;\n            }\n        }\n        return max;\n    }\n}\n```
['Java']