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

你可能感兴趣的:(heap,STL,sort_heap)