当前位置:网站首页>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
边栏推荐
- Is it really hopeless to choose electronic engineering and be discouraged?
- Motor control column summary
- Unity Profiler
- 如何从内存解析的角度理解“数组名实质是一个地址”?
- Mongodb common commands
- Efficient, reliable and safe open source solution for serial communication
- Hack the box -sql injection fundamentals module detailed Chinese tutorial
- Redis persistence AOF
- Yolov3 preparatory work
- Redis 官方可视化工具,高颜值,功能真心强大!
猜你喜欢

517. Super washing machine

Hack the box - Web requests module detailed Chinese tutorial

动态内存管理及柔性数组

MBA-day29 算术-绝对值初步认识

520送什么?DIY一个高颜值RGB时钟,女生看了都想要

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

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

102. (cesium chapter) cesium road streamer

A trick to teach you to easily understand Potter's map

You'd better not take this kind of project!
随机推荐
Lemon class automatic learning after all
数仓搭建-DIM层
Day110.尚医通:Gateway集成、医院排班管理:科室列表、根据日期统计数据、排班详情
Redis事务
IVR在voip电话系统的应用与价值
Mongondb API usage
Another open source artifact, worth collecting and learning!
ERROR: Could not open requirements file: [Errno 2] No such file or directory: ‘requirments.txt’
OD-Paper【2】:Fast R-CNN
SIP账号注册的SIP软电话的使用和常见问题
Qt编写物联网管理平台47-通用数据库设置
vagrant下载速度慢的解决方法
520送什么?DIY一个高颜值RGB时钟,女生看了都想要
解决Vagrant报错b:48:in `join‘: incompatible character encodings: GBK and UTF-8 (Encoding::Compatib
高分子物理试题库
nn.Moudle模块-创建神经网络结构需要注意的细节
Embedded general learning route arrangement
High frequency electronic circuit review examination questions and answers
Hack the box -sql injection fundamentals module detailed Chinese tutorial
Project topic selection reference