C++ || Two Pointer Approach
\nclass Solution {\npublic:\n    vector<int> getStrongest(vector<int>& arr, int k) \n    {\n        sort(arr.begin(),arr.end());\n        int m = arr[(arr.size(
```\nclass Solution {\npublic:\n    vector<int> getStrongest(vector<int>& arr, int k) \n    {\n        sort(arr.begin(),arr.end());\n        int m = arr[(arr.size()-1)/2];\n        int i=0,j=arr.size()-1;\n        vector<int >res;\n        for(;i<=j;)\n        {\n            if(abs(arr[j]-m)>abs(arr[i]-m))\n            {\n                res.push_back(arr[j]);\n                j--;\n            }\n            else if(abs(arr[j]-m)==abs(arr[i]-m))\n            {\n                if(arr[j]>arr[i])\n                {\n                    res.push_back(arr[j]);\n                    j--;\n                }\n                else\n                {\n                    res.push_back(arr[i]);\n                    i++;    \n                }\n            }\n            else\n            {\n                res.push_back(arr[i]);\n                i++;\n            }\n            if(res.size()==k)\n            {\n                break;\n            }\n        }\n        return res;\n    }\n};\n```
['C', 'C++']