Python3, simple solution O(nlogn) for sorting + O(k) for finding the result
\ndef getStrongest(self, arr: List[int], k: int) -> List[int]:\n        arr = sorted(arr)\n        medianIndex = (len(arr) - 1) // 2\n        median = arr[media
```\ndef getStrongest(self, arr: List[int], k: int) -> List[int]:\n        arr = sorted(arr)\n        medianIndex = (len(arr) - 1) // 2\n        median = arr[medianIndex]\n        \n        result = []\n        backPointer = -1\n        frontPointer = 0\n        for i in range(k):\n            if(abs(arr[backPointer] - median) >= abs(arr[frontPointer] - median)):\n                result.append(arr[backPointer])\n                backPointer -= 1\n            elif(abs(arr[backPointer] - median) < abs(arr[frontPointer] - median)):\n                result.append(arr[frontPointer])\n                frontPointer += 1\n        \n        return result\n```
[]