nth_element « STL Algorithms Sorting « C++ Tutorial






27.7.nth_element
27.7.1.Illustrating the generic nth_element algorithm
27.7.2.Use nth_element to extract the four lowest elements
27.7.3.Use nth_element to extract the four highest elements
27.7.4.Use nth_element with custom function to extract the four highest elements