摘要:该文从两个角度分析了完全二叉树的总结点数与叶结点数之间的关系。其一,通过归纳找到总结点数的奇偶性与度为1的结点个数之间的关系,进而导出总结点数与叶结点数的关系;其二,由最后一个结点的父结点为倒数第一个分支结点的事实,找到总结点数与叶结点数的关系。这种多角度的分析有利于学生对此数据结构的深入理解。
关键词:数据结构;树;二叉树;完全二叉树
中图分类号:TP311文献标识码:A文章编号:1009-3044(2008)34-1569-02
Complete Binary Tree Nodes and Leaves Number Relation
LIU Song, LAN Ying
(College of Computer Science and Technology, Jilin Normal University, Siping 136000, China)
Abstract: This paper analyzed the relation between the complete binary tree nodes and the leaves number by two ways. First, it induced the relation between the odevity of complete binary tree nodes and the number of one degree nodes, then come to the conclusion. Second, through the fact that the parent of the last node is the last branch node, the paper got the same conclusion. Analyzing by two ways is helpful for students to und