sort排序的时间复杂度
时间: 2024-01-02 12:38:20 浏览: 99
sort排序的时间复杂度为Nlog2(N)。\[2\]这意味着排序的时间随着元素数量的增加而呈对数级增长。因此,当元素数量较大时,sort排序的时间会比较长。
#### 引用[.reference_title]
- *1* *3* [C++的STL库,vector sort排序时间复杂度 及常见容器比较](https://blog.csdn.net/adaptiver/article/details/52925792)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [C++ sort()](https://blog.csdn.net/JCjunior/article/details/106741712)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文