C++ code : using a MULTIMAP.
\nclass Solution {\npublic:    \n    vector<int> getStrongest(vector<int>& arr, int k) \n    {\n        sort(arr.begin(), arr.end());\n        int n = arr.size(
```\nclass Solution {\npublic:    \n    vector<int> getStrongest(vector<int>& arr, int k) \n    {\n        sort(arr.begin(), arr.end());\n        int n = arr.size();\n        int m = (n - 1) / 2;\n        \n        multimap<int, int> M;\n        int c=0;\n        for(int i : arr)\n        {\n            M.insert({abs(i-arr[m]), c});\n            c++;\n        }\n        \n        vector<int> ans;\n        for (auto i = M.rbegin(); i != M.rend(); ++i)\n        {\n            if(k == 0) break;\n            ans.push_back(arr[i->second]);\n            k--;\n        }\n        return ans;\n    }\n};\n```
[]