Sort (C++)
sort is a function in C++ Standard Library that takes two random-access iterators, the start and the end, as arguments and performs a comparison sort on the range of elements between the two iterators, front-inclusive and end-exclusive. The specific sorting algorithm is not mandated and may vary across implementations. The GNU Standard C++ library, for example, uses a hybrid sorting algorithm: introsort is performed first, to a maximum depth given by 2×log2 n, where n is the number of elements, followed by an insertion sort on the result. Whatever the implementation, the complexity should be O(nlogn) comparisons on the average.
Read more about Sort (C++): Usage, Other Types of Sorting, Comparison To Qsort, See Also, External Links
Famous quotes containing the word sort:
“Everywhereall over Africa and South America ... you see these suburbs springing up. They represent the optimum of what people want. Theres a certain sort of logic leading towards these immaculate suburbs. And theyre terrifying, because they are the death of the soul.... This is the prison this planet is being turned into.”
—J.G. (James Graham)