C++ 11标准保证在最坏的情况下std::sort具有O(n logn)复杂度 .这与C++ 98/03中的平均情况保证不同,可以使用Quicksort实现(可能与小n的插入排序结合使用),在最坏的情况下具有O(n ^ 2)(对于某些特定情况)输入,例如排序输入).std::sort
std::sort
std::sort不同的STL库中的实现是否有任何变化?C++ 11如何std::sort在不同的STL中实现?
c++ sorting algorithm stl c++11
algorithm ×1
c++ ×1
c++11 ×1
sorting ×1
stl ×1