Array
C++\ncpp\nint findMaxK(vector<int>& nums) {\n    int arr[2001] = {}, res = -1;\n    for (int n : nums) {\n        if (arr[-n + 1000])\n            res = max(res
**C++**\n```cpp\nint findMaxK(vector<int>& nums) {\n    int arr[2001] = {}, res = -1;\n    for (int n : nums) {\n        if (arr[-n + 1000])\n            res = max(res, abs(n));\n        ++arr[n + 1000];        \n    }\n    return res;\n}\n```
[]