c++ solution using custom sorting.
\nclass Solution {\npublic:\n    vector<int> getStrongest(vector<int>& arr, int k) {\n        \n        int len = arr.size();\n        sort(arr.begin(), arr.end
```\nclass Solution {\npublic:\n    vector<int> getStrongest(vector<int>& arr, int k) {\n        \n        int len = arr.size();\n        sort(arr.begin(), arr.end());  // sort to get median\n        int idx = (len-1)/2;\n        int median = arr[idx];\n        \n        auto cmp = [&](int a, int b){  // lambda function\n            if(abs(a-median) == abs(b-median)){\n                return a > b;\n            }else{\n                return abs(a-median) > abs(b-median);\n            }\n        };\n        \n        sort(arr.begin(), arr.end(), cmp);\n        return {arr.begin(), arr.begin()+k};  //list of the strongest k\n    }\n};\n```
['C', 'Sorting']