[C++] simple sort function using comparator
c++\nint m;\nbool comp(int a,int b){\n    int a1=abs(a-m),a2=abs(b-m);\n    if(a1>a2)return true;\n    else if(a2>a1)return false;\n    return a>b;\n}\nclass So
```c++\nint m;\nbool comp(int a,int b){\n    int a1=abs(a-m),a2=abs(b-m);\n    if(a1>a2)return true;\n    else if(a2>a1)return false;\n    return a>b;\n}\nclass Solution {\npublic:\n    vector<int> getStrongest(vector<int>& arr, int k) {\n        sort(arr.begin(),arr.end());\n        int n=arr.size();\n        m=arr[(n-1)/2];\n        sort(arr.begin(),arr.end(),comp);\n        return vector<int>(arr.begin(),arr.begin()+k);\n    }\n};\n```
['C', 'Sorting', 'C++']