当前位置:网站首页>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 .
边栏推荐
- View CSDN blog rankings
- 给定两个整形变量的值,将两个值的内容进行交换 (C语言)
- 2019.10.6 training summary
- Real time value transfer from C form to another form
- LVGL库入门教程 - 动画
- 1146 topological order (25 points)
- Add/modify/drop column of alter table operation in MySQL
- Rikka with cake (segment tree + segment tree)
- Recurrence of vulnerability analysis for Cisco ASA, FTD and hyperflex HX
- Comprehensive understanding of synchronized
猜你喜欢

2021 team programming ladder competition - Simulation Competition

BUUCTF--新年快乐

Reading notes of CLR via C -clr boarding and AppDomain

全面理解Synchronized

Use of Azkaban in task scheduler

This open source project is super wow, and handwritten photos are generated Online

Hystrix fuse: Service fusing and service degradation

Comment terminer rapidement une partition de disque

2020-10-17:刷题1

这个开源项目超哇塞,手写照片在线生成
随机推荐
Is it safe to open a securities account? Is it reliable?
L2-3 is this a binary search tree- The explanation is wonderful
arcgis创建postgre企业级数据库
Vmware的下载与安装(基本思路+详细过程)
Bug的描述、定级、生命周期
BUUCTF--新年快乐
二叉树
2019.10.30 learning summary
C语言库函数--strstr()
September 23, 2020 left and right values reference std:: move()
520 diamond Championship 2021
Text of the basic component of the shutter
Solve the problem that zxing's QR code contains Chinese garbled code
std::make_ shared<T>/std::make_ Unique < T> and std:: shared_ ptr<T>/std::unique_ The difference and relation between PTR < t >
产品力不输比亚迪,吉利帝豪L雷神Hi·X首月交付1万台
IIS服务器相关错误
mysql 8.0 一条insert语句的具体执行流程分析(二)
Fully understand the volatile keyword
全面理解Synchronized
Beautiful ruins around Kiev -- a safe guide to Chernobyl!