I want to get the index of the median element of an std::vector in c++11, while comparing the elements with a custom comparator. I believe I can use nth_element ? Can someone give me an example ?
I want to get the index of the median element of an std::vector in c++11, while comparing the elements with a custom comparator. I believe I can use nth_element ? Can someone give me an example ?
برچسب:
نویسنده: استخدام کار