摘要
提出了一种生成所有堆的枚举算法,该算法采用了递归子树判断法,递归地将待生成的堆分为左右2个子树判断,并结合层次判断方法,提高了算法的效率,测试结果验证了该算法的有效性和可靠性。
This paper puts forward an improvement on an enumeration algorithm of generation all heaps. Recursion judgement on left subtree and right subtree and judegment of hierarchy are combined to raise the efficiency of the algorithm. The test results indicate the validity and reliability of the algorithm.
出处
《计算机工程》
CAS
CSCD
北大核心
2006年第20期62-64,共3页
Computer Engineering
关键词
生成
堆
层次算法
递归子树判断
Generation
Heap
Recursion algorithm
Judgement of hierarchy subtree