Simple Solution (Faster 100% Runtime) ✅
\n# Approach\n- Reduce the entire inputArray into unique elements using Sets\n- Split the elements into two subarrays; positiveNums and negativeNums (absolutive
\n# Approach\n- Reduce the entire inputArray into unique elements using `Sets`\n- Split the elements into two **subarrays**; `positiveNums` and `negativeNums` (absolutive value)\n- Get the largest **intersection** (common element) between the two subarrays, if none exists, return `-1`\n\n# Code\n```\nclass Solution {\n    func findMaxK(_ nums: [Int]) -> Int {\n        let nums = Set(nums)\n        var positiveNums = [Int]()\n        var negativeNums = [Int]()\n        \n        for num in nums {\n            if num > 0 {\n                positiveNums.append(num)\n            } else {\n                negativeNums.append(abs(num))\n            }\n        }\n        \n        return largestIntersectionK(positiveNums, negativeNums)\n    }\n    \n    private func largestIntersectionK(_ positiveNums: [Int], _ negativeNums: [Int]) -> Int {\n        let positiveSet = Set(positiveNums)\n        let negativeSet = Set(negativeNums)\n        let intersectionArray = positiveSet.intersection(negativeSet)\n        \n        return intersectionArray.max() ?? -1\n    }\n}\n```
['Array', 'Swift', 'Sorting']