[Python] 3 Solutions: Sort, Heap, Two-Pointer
Double Sort\npython\nclass Solution:\n    def getStrongest(self, arr: List[int], k: int) -> List[int]:\n        arr.sort()\n        m = arr[((len(arr) - 1) // 2
**Double Sort**\n```python\nclass Solution:\n    def getStrongest(self, arr: List[int], k: int) -> List[int]:\n        arr.sort()\n        m = arr[((len(arr) - 1) // 2)]\n        return sorted(arr, key = lambda x: (abs(x - m), x), reverse = True)[:k]\n```\n\n**Heap**\n```python\nclass Solution:\n    def getStrongest(self, arr: List[int], k: int) -> List[int]:\n        arr.sort()\n        m, h, result = arr[((len(arr) - 1) // 2)], [(-abs(a-m), -a) for a in arr], []\n        heapq.heapify(h)\n        for i in range(k):\n            result.append(-heapq.heappop(h)[1])\n        return result\n```\n\n**Two-Pointer**\n```python\nclass Solution:\n    def getStrongest(self, arr: List[int], k: int) -> List[int]:\n        arr.sort()\n        m, result = arr[((len(arr) - 1) // 2)], []\n        left, right = 0, len(arr)-1\n        while len(result) < k:\n            if abs(arr[left] - m) > abs(arr[right] - m):\n                result.append(arr[left])\n                left += 1\n            else:\n                result.append(arr[right])\n                right -= 1\n        return result\n```
[]