数据库树算法(数据结构-树)

 2025-06-24  阅读 400  评论 0

摘要:发现国内好多教材对树的解释含含糊糊,找了下英文原版,理解就没那么费劲了结点的level:The level of a node is defined by 0 (the number of connections between the node and the root).结点的高度(Heig

发现国内好多教材对树的解释含含糊糊,找了下英文原版,理解就没那么费劲了

结点的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)

数据库树算法(数据结构-树)(1)

完全二叉树(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.

数据库树算法(数据结构-树)(2)

完满二叉树(Full Binary Tree)

数据库树算法(数据结构-树)(3)

数据库树算法(数据结构-树)(4)

,

版权声明:xxxxxxxxx;

原文链接:http://cn.tdroid.net/ce1a0Cz0HBgwMUVM.html

发表评论:

管理员

  • 内容264811
  • 积分0
  • 金币0
关于我们
lecms主程序为免费提供使用,使用者不得将本系统应用于任何形式的非法用途,由此产生的一切法律风险,需由使用者自行承担,与本站和开发者无关。一旦使用lecms,表示您即承认您已阅读、理解并同意受此条款的约束,并遵守所有相应法律和法规。
联系方式
电话:
地址:广东省中山市
Email:
注册登录
注册帐号
登录帐号

Copyright © 2022 太卓开发网 Inc. 保留所有权利。 泰达科技网易库网

页面耗时0.1790秒, 内存占用1.33 MB, 访问数据库18次