Python 5-line solution using sort with comments
class Solution:\n\n    def getStrongest(self, arr: List[int], k: int) -> List[int]:\n        arr.sort(reverse = True) # sort the arr in descending order, this w
class Solution:\n\n    def getStrongest(self, arr: List[int], k: int) -> List[int]:\n        arr.sort(reverse = True) # sort the arr in descending order, this will put the larger number at first if they have same distance to the median\n        m_index = len(arr) - (len(arr)-1)//2 - 1 # median index in reversely sorted arr\n        m = arr[m_index]\n        arr.sort(key = lambda x: abs(x-m), reverse = True) # sorted the arr again by absolute distance \n        return arr[:k]
['Sorting', 'Python']