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:
“Who knows what sort of seventeen-year locust will next come out of the ground?”
—Henry David Thoreau (18171862)