Skip to content

Latest commit

 

History

History
 
 

heap

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

heap包

概述:

任何实现了heap.Interface接口的对象都可以使用heap包提供的方法对堆进行操作(堆是一个完全二叉树)。通过对heap.Interface中的Less方法的不同实现,来实现最大堆和最小堆。通常堆的数据结构为一个一维数组。

维基百科:[堆(数据结构)](http://zh.wikipedia.org/wiki/%E5%A0%86_(%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84\))

函数列表: