
please wait
Complexity On average, linearithmic in the distance between first and last: Performs approximately N*log2(N) (where N is this distance) comparisons of elements, and up to that many element swaps (or moves). |
1 Effects: Sorts the elements in the range [first,last). 2 Requires: RandomAccessIterator shall satisfy the requirements of ValueSwappable (17.6.3.2). The typeof *first shall satisfy the requirements of MoveConstructible (Table20) and of MoveAssignable (Table 22). 3 Complexity: O(N log(N)) (where N == last - first) comparisons. |
Repeater wrote: |
---|
The C++ standard does not dictate what sorting algorithm must be used by std::sort. It makes the following demands: |