[C++] O(n) shortest quickselect solution
Average time complexity : O(n)\nWorst time complexity : O(n^2)\n\n\nint getMedian(vector<int> arr)\n{\n\tnth_element(arr.begin(), next(arr.begin(), \n\t\t(arr.s
Average time complexity : O(n)\nWorst time complexity : O(n^2)\n\n```\nint getMedian(vector<int> arr)\n{\n\tnth_element(arr.begin(), next(arr.begin(), \n\t\t(arr.size() - 1)/ 2), arr.end());\n\n\treturn arr[(arr.size() - 1)/ 2];\n}\n\nvector<int> getStrongest(vector<int>& arr, int k) \n{\n\tauto median = getMedian(arr);\n\n\tnth_element(arr.begin(), next(arr.begin(), k), arr.end(), \n\t\t[median](auto n1, auto n2)\n\t\t\t{ return abs(median - n1) == abs(median - n2) ?\n\t\t\t\tn1 > n2 : abs(median - n1) > abs(median - n2); });\n\n\treturn vector<int>(arr.begin(), next(arr.begin(), k));\n}\n```
[]