STL系列之四 heap 堆

下面再介紹STL中與堆相關的4個函數——創建堆make_heap(),在堆中添加數據push_heap(),在堆中刪除數據pop_heap()和堆排序sort_heap():算法 頭文件 #include <algorithm>windows 下面的_First與_Last爲能夠隨機訪問的迭代器(指針),_Comp爲比較函數(仿函數),其規則——若是函數的第一個參數小於第二個參數應返回true,不
相關文章
相關標籤/搜索