tft每日頭條

 > 科技

 > 數據庫樹算法

數據庫樹算法

科技 更新时间:2024-09-17 17:19:52

發現國内好多教材對樹的解釋含含糊糊,找了下英文原版,理解就沒那麼費勁了

結點的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

,

更多精彩资讯请关注tft每日頭條,我们将持续为您更新最新资讯!

查看全部

相关科技资讯推荐

热门科技资讯推荐

网友关注

Copyright 2023-2024 - www.tftnews.com All Rights Reserved