Too Simple with C++ 2pointers
\nclass Solution {\npublic:\n    vector<int> getStrongest(vector<int>& arr, int k) {\n        //In a sorted vector either 1st or last will be strongest\n       
```\nclass Solution {\npublic:\n    vector<int> getStrongest(vector<int>& arr, int k) {\n        //In a sorted vector either 1st or last will be strongest\n        //Seems like a simple 2pointer question\n        int i=0,j=arr.size()-1;\n        sort(arr.begin(),arr.end());\n        int med=arr[(arr.size()-1)/2];\n        vector<int>ans;\n        for(int l=0;l<k;l++)\n        {\n            if(abs(arr[i]-med)>abs(arr[j]-med))\n                ans.push_back(arr[i++]);\n            else\n                ans.push_back(arr[j--]);\n        }\n        return ans;\n    }\n};\n```
[]