排序算法(二)

排序算法 C++ STL的排序算法(Sorting algorithms)是一組將無序序列排列成有序序列的模板函數或與排列相關的模板函數,如折半查找,堆排序等。排序算法一般適用於序列容器,不適用於內部數據結構較爲複雜的關聯容器。 一般函數實現位於stl_algo.h。. 8、排序sort 時間複雜度在最壞情況下僅爲O(log2n)。 template<class RanIt>     void s
相關文章
相關標籤/搜索