2 line Python
Summary\nFirst sort to calc the median arr[(len(arr) - 1) // 2]\nThen sort by key abs(num - arr[(len(arr) - 1) // 2]) and num\nTake the last k elements\n\npytho
**Summary**\nFirst sort to calc the median `arr[(len(arr) - 1) // 2]`\nThen sort by key `abs(num - arr[(len(arr) - 1) // 2])` and `num`\nTake the last k elements\n\n```python\nclass Solution:\n    def getStrongest(self, arr: List[int], k: int) -> List[int]:\n        arr.sort()\n        return sorted(arr, key=lambda num: (abs(num - arr[(len(arr) - 1) // 2]), num))[-k:]\n```
[]