Python3 solution beats 100% of submissions
\nclass Solution:\n    \n    def getStrongest(self, arr: List[int], K: int) -> List[int]:\n        arr.sort()\n        length = len(arr)\n        res = arr[(len
```\nclass Solution:\n    \n    def getStrongest(self, arr: List[int], K: int) -> List[int]:\n        arr.sort()\n        length = len(arr)\n        res = arr[(length-1)//2]\n        i = 0\n        j = length-1\n        result = []\n        while K>0:\n            a = abs(arr[i]-res)\n            b = abs(arr[j]-res)\n            if a>b or (a==b and arr[i]>arr[j]):\n                result.append(arr[i])\n                i+=1\n            else:\n                result.append(arr[j])\n                j-=1\n            K-=1\n        return result\n```
[]