当前位置:网站首页>Full binary tree / true binary tree / complete binary tree~
Full binary tree / true binary tree / complete binary tree~
2022-07-26 05:45:00 【[email protected]】
- True binary tree : The degree of all nodes is 0 or 2

- Full binary tree : The degree of all nodes is 0 or 2 , And all leaf nodes are on the last layer
nature : The first i Number of nodes in the layer :2 i-1
Number of leaf nodes :2 h-1
Sum up points :n = 2 0 + 2 1 + 2 2 … + 2 h-1 =2 h -1
Height :h = log2(n+1)
- Perfect binary tree : Leaf nodes only appear in the last two layers , And the leaf nodes of the last layer are aligned to the left
nature : Degree is 1 The node has only the left subtree
Degree is 1 The node of either 1 individual , Or 0 individual
A binary tree with the same number of nodes , The height of a complete binary tree is the smallest
Suppose the height of a complete binary tree is h , So at least there is 2 h-1 Nodes , At most 2 h -1 Nodes .
notes : A full binary tree must be a real binary tree , True binary trees are not necessarily full of binary trees . A full binary tree must be a complete binary tree , A complete binary tree is not necessarily a full binary tree
版权声明
本文为[[email protected]]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/207/202207260542336258.html
边栏推荐
- 高效,可靠,安全的串口通讯开源方案
- Debugging sharp weapon! A lightweight log library log.c
- 又一开源神器,值得收藏学习!
- sdc中对cdc的处理方式
- FTP experiment and overview
- ERROR: Could not open requirements file: [Errno 2] No such file or directory: ‘requirments.txt’
- 我又发现了超赞的软硬件项目,全部开源
- 日志收集分析平台搭建-1-环境准备
- 5-year-old Test Engineer - how to choose the next step?
- 软件测试面试题全网独家没有之一的资深测试工程师面试题集锦
猜你喜欢

Hack The Box - Introduction to Networking Module详细讲解中文教程

解决Vagrant报错b:48:in `join‘: incompatible character encodings: GBK and UTF-8 (Encoding::Compatib

Motor control column summary

嵌入式通用学习路线整理

金仓数据库 KingbaseES SQL 语言参考手册 (6. 表达式)

Day110.尚医通:Gateway集成、医院排班管理:科室列表、根据日期统计数据、排班详情

Code audit CMS

Redis发布订阅

SSTI payload and various bypass methods

ES Cluster in Red status: what about write & delete operations?
随机推荐
idea yml 文件代码不提示解决方案
[personal summary] end of July 24, 2022
How to view the container name in pod
High frequency electronic circuit review examination questions and answers
《MongoDB入门教程》第08篇 比较运算符
517. Super washing machine
二叉排序树(BST) ~
Redis publish subscription
Six sixths -- it's a little late and a little shallow
Unity Profiler
Yolov3 preparatory work
Lamp architecture
SSTI payload and various bypass methods
选电子工程被劝退,真的没前景了?
LNMP architecture
How to understand "array name is essentially an address" from the perspective of memory parsing?
Lemon class automatic learning after all
Two auxiliary functions of integral Mall for business user operation
No EGL display error resolution
C language explanation series - understanding of functions (4) declaration and definition of functions, simple exercises