当前位置:网站首页>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
边栏推荐
- FTP experiment and overview
- 嵌入式通用学习路线整理
- Redis 官方可视化工具,高颜值,功能真心强大!
- Efficient, reliable and safe open source solution for serial communication
- 高频电子线路复习考试题及答案
- Yuancosmos provides a digital social platform for fashion design display
- Another open source artifact, worth collecting and learning!
- Motor control column summary
- Circular structure practice
- Project topic selection reference
猜你喜欢

动态内存管理及柔性数组

ES Cluster in Red status: what about write & delete operations?

NFT in the eyes of blackash: the platform is crying for slaughter, and users send money to the door

517. Super washing machine

I also found excellent software and hardware projects, all open source

5-year-old Test Engineer - how to choose the next step?

柠檬班自动化学习毕竟

DOM操作--操作节点

SSTI payload and various bypass methods

Six sixths -- it's a little late and a little shallow
随机推荐
满二叉树 / 真二叉树 / 完全二叉树 ~
sdc中对cdc的处理方式
Hack the box - Web requests module detailed Chinese tutorial
Processing method of CDC in SDC
《MongoDB入门教程》第08篇 比较运算符
这种项目,最好别接!
Motor control column summary
解决Vagrant报错b:48:in `join‘: incompatible character encodings: GBK and UTF-8 (Encoding::Compatib
ES Cluster in Red status: what about write & delete operations?
5-year-old Test Engineer - how to choose the next step?
Day110.尚医通:Gateway集成、医院排班管理:科室列表、根据日期统计数据、排班详情
SQL injection
Redis发布订阅
Usage and common problems of SIP softphone registered with SIP account
nn.Moudle模块-创建神经网络结构需要注意的细节
日志收集分析平台搭建-1-环境准备
I also found excellent software and hardware projects, all open source
高分子物理试题库
ERROR: Could not open requirements file: [Errno 2] No such file or directory: ‘requirments.txt’
It's enough for newcomers to learn how to do functional tests