Swift Two Pointers
\nclass Solution {   \n    func getStrongest(_ arr: [Int], _ k: Int) -> [Int] {\n        let sorted = arr.sorted()\n        let mIndex =  (arr.count - 1) / 2\n 
```\nclass Solution {   \n    func getStrongest(_ arr: [Int], _ k: Int) -> [Int] {\n        let sorted = arr.sorted()\n        let mIndex =  (arr.count - 1) / 2\n        let m = sorted[mIndex]\n        var p1 = 0\n        var p2 = arr.count - 1\n        \n        var rest = [Int]()\n        while rest.count < k {\n            let p1Val = abs(sorted[p1] - m)\n            let p2Val = abs(sorted[p2] - m)\n            if p1Val > p2Val {\n                rest.append(sorted[p1])\n                p1 += 1\n            } else {\n                rest.append(sorted[p2])\n                p2 -= 1\n            }\n        }\n        return rest\n    }\n}\n```
[]