From cplusplus.com std::sort , complexity is defined:
Complexity
Approximately N * logN comparisons on average (where N is the last-first). In the worst case, up to N2, depending on the specific sorting algorithm used in the implementation of the library.
I have some run-time restrictions for my applications. So I need to know if I should implement my own sorting algorithm or if it will be a waste of time. They are compiled using gcc, so I need to know which sorting algorithm gcc uses.
c ++ gcc time-complexity
kravemir Aug 28 '11 at 13:27 2011-08-28 13:27
source share