easyyyy
```\nclass Solution {\npublic:\n    vector getStrongest(vector& arr, int k) {\n        int n = arr.size();\n        sort(arr.begin(), arr.end());\n        int m
```\nclass Solution {\npublic:\n    vector<int> getStrongest(vector<int>& arr, int k) {\n        int n = arr.size();\n        sort(arr.begin(), arr.end());\n        int med = arr[(n-1)/2];\n        int left = 0, right = arr.size()-1;\n        \n        k = min(k,(int) arr.size());\n        vector<int> res;\n        while(left<=right && k)\n        {\n            if(abs(med-arr[left])<=abs(med-arr[right]))\n            {\n                while(left<right && arr[right]==arr[right-1]) \n                {\n                    if(!k) return res;\n                    res.push_back(arr[right]);\n                    right--;\n                    k--;\n                }\n                if(k) \n                {\n                    res.push_back(arr[right]);\n                    right--;\n                    k--;\n                }\n            }\n            else\n            {\n                while(left<right && arr[left]==arr[left+1]) \n                {\n                    if(!k) return res;\n                    res.push_back(arr[left]);\n                    left++;\n                    k--;\n                }\n                if(k)\n                {\n                    res.push_back(arr[left]);\n                    left++;\n                    k--;\n                }\n            }\n        }\n        return res;\n    }\n};
['Two Pointers', 'C']