当前位置:网站首页>Binary tree
Binary tree
2022-06-29 10:36:00 【Xihong Shiwang has many fish】
1. Definition
A binary tree is a tree structure in which each node has at most two subtrees . Usually a subtree is called “ The left subtree ”(left subtree) and “ Right subtree ”(right subtree).
Perfect binary tree : In a binary tree , Except for the last floor , If the rest of the layers are full , And the last layer is either full , Or there is a lack of consecutive nodes on the right .
2. Simple concept
The degree of node : The number of subtrees owned by the node .
leaf : A node of degree zero .
Branching nodes : Nodes with degree not zero .
The degree of a tree : The maximum degree of a node in a tree .
level : The level of the root node is 1, The hierarchy of the other nodes is equal to the hierarchy of the parent nodes of the node plus 1.
The height of the tree : The maximum level of nodes in a tree .
Disordered trees : If the order between the subtrees of the nodes in the tree is not important , You can switch places .
Ordered trees : If the order between the subtrees of nodes in a tree is important , You can't swap places .
The forest :0 One or more disjoint trees make up . Add a root to the forest , The forest becomes a tree ; Delete the root , Trees become forests .
边栏推荐
- Vmware的下载与安装(基本思路+详细过程)
- Analyze in detail the PBOT mining virus family behavior and the principle of exploited vulnerabilities, and provide detailed protection suggestions for the blue army
- CLR via C reading notes - loading and AppDomain
- Wandering -- the last programming challenge
- 1098 insertion or heap sort (25 points)
- L2-031 go deep into the tiger's den (25 points)
- Arc view and arc viewpager
- 1-数据库了解
- 通过Win32API调用另一界面的按钮
- Recyclerview sticky (suspended) head
猜你喜欢
随机推荐
Recurrence of vulnerability analysis for Cisco ASA, FTD and hyperflex HX
区域工业互联网市场成绩单,百度智能云开物第二
BUUCTF--reverse2
2019.11.20 training summary
Maze walking BFS medium + -- the last programming challenge
LVGL库入门教程 - 动画
September 17, 2020 gateway business process has two tasks: referer certification and non commodity Templating
Comment terminer rapidement une partition de disque
L2-026 small generation (25 points)
SQL Server 数据库的统计查询
1146 topological order (25 points)
2019.10.30 learning summary
L2-025 divide and rule (25 points)
SQL Server 数据库的几种简单查询
Dev使用过程中的基本操作
How can I get the stock account opening discount? Also, is it safe to open an account online?
Devaxpress double click to get cell data
arcgis创建postgre企业级数据库
September 25, 2020 noncopyable of boost library for singleton mode
Recyclerview universal adapter package









