Swift solution
Complexity\n- Time complexity: O(n)\n Add your time complexity here, e.g. O(n) \n\n- Space complexity: O(n)\n Add your space complexity here, e.g. O(n) \n\n# Co
# Complexity\n- Time complexity: $$O(n)$$\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: $$O(n)$$\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\n    func findMaxK(_ nums: [Int]) -> Int {\n        var numSet = Set<Int>()\n        var result = -1\n        for num in nums {\n            numSet.insert(num)\n            if abs(num) > result && numSet.contains(-num) {\n                result = abs(num)\n            }\n        }\n        return result\n    }\n}\n\n```
['Array', 'Hash Table', 'Swift']