Hashing [C++/Java]
Count positive whose negative is there in the array using hashing.\n\nTime - O(n)\nSpace - O(n)\n# C++\n    int findMaxK(vector& a) {\n        unordered_set st(
Count positive whose `negative` is there in the array using `hashing`.\n\nTime - O(`n`)\nSpace - O(`n`)\n# C++\n    int findMaxK(vector<int>& a) {\n        unordered_set<int> st(begin(a),end(a));\n        int res = -1;\n        for(int p : a) \n            if(p > 0 and st.count(-p)) res = max(res , p);\n        return res;\n    }\n\t\n# Java\n    public int findMaxK(int[] nums) {\n        HashSet<Integer> st = new HashSet<>();\n        for (int i : nums) st.add(i);\n        int res = -1;\n        for (int p : nums)\n\t\t     if (p > 0 && st.contains(-p)) res = Math.max(res, p);\n        return res;\n    }
['C', 'Java']