STL源碼剖析之算法:sort_heap

  1. template <class RandomAccessIterator> 
  2. void sort_heap(RandomAccessIterator first, RandomAccessIterator last) { 
  3.     while(last - first > 1) 
  4.         pop_heap(first, last--); 

注:pop_heap源碼請見http://zxn990.blog.51cto.com/4253193/1165524

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章