数据结构树和二叉树知识点总结(数据结构树的定义)
在生活中,很多人可能想了解和弄清楚数据结构-树的相关问题?那么关于数据结构树和二叉树知识点总结的答案我来给大家详细解答下。
发现国内好多教材对树的解释含含糊糊,找了下英文原版,理解就没那么费劲了
结点的level:The level of a node is defined by 0 + (the number of connections between the node and the root).
结点的高度(Height):The height of a node is the number of edges on the longest path between that node and a leaf.
树的高度:The height of a tree is the height of its root node.
结点的深度(Depth of node):The depth of a node is the number of edges from the tree's root node to the node.
结点的度(Degree):The number of sub trees of a node.
叶子(Leaf):A node with no children.
二叉树的性质:
(1)若二叉树的层次从0开始,则在二叉树的第i层至多有2^i个结点(i>=0)。
(2)高度为k的二叉树最多有2^(k+1) - 1个结点(k>=-1)。 (空树的高度为-1)
(3)对任何一棵二叉树,如果其叶子结点(度为0)数为m, 度为2的结点数为n, 则m = n + 1。
完美二叉树(Perfect Binary Tree)
完全二叉树(Complete Binary Tree)
A Complete Binary Tree (CBT) is a binary tree in which every level, except possibly the last, is completely filled, and all nodes are as far left as possible.
完满二叉树(Full Binary Tree)
温馨提示:通过以上关于数据结构-树内容介绍后,相信大家有新的了解,更希望可以对你有所帮助。