当前位置:网站首页>The concept of tree
The concept of tree
2022-06-21 07:29:00 【Follow the road to the end】
1

The root node level is 1, Increase in descending order
The level of the deepest node in the tree is called the height of the tree
Special form of binary tree

Every node of the binary tree reaches the maximum value , It's called a full binary tree .
Binary tree except the last layer , The nodes of each layer reach the maximum , And the last layer of nodes are located on the left , It's called a complete binary tree .
A full binary tree also belongs to a complete binary tree .
Storage form of binary tree

Because the structure of complete binary tree is continuous , There are traces to follow , Sequential storage can be adopted .
From left to right , Store the nodes in the array from top to bottom .
Incomplete binary tree , Node does not exist and can be used null Placeholder in array , But it's a waste of space .

Ordinary binary tree has irregular structure , Sequential storage is not suitable , To record the relationship between nodes , Chain storage can be used .
Each node passes through value Indicated value ,left、right, Represents the left and right child nodes .
1
边栏推荐
- Mingming has just changed his profession and won five offers as soon as he graduated
- China uncoated intermittent catheter market trend report, technical innovation and market forecast
- JS operation cookie, JS setting cookie value, JS reading cookie value
- Do you know all the extension racks of ThinkPHP?
- 微信小程序_4,WXSS模板样式
- [regular expression daily skill] escape characters with special meanings in regular expressions
- 基于Flexsim的供应链建模与仿真课程设计
- QML控件类型:Drawer
- Tensorrt笔记(三)参考整理
- Pinia advanced: elegant setup (functional) writing + encapsulation into your enterprise project
猜你喜欢

如何安装Visual Studio Code编辑器?

Actual battle of wechat applet project -- music applet developed based on wyy music real interface

Transport layer TCP header - serial number and acknowledgement number

Easyexcel introduction-01

AutoCAD - drawing units and drawing boundaries

怎么看小程序是谁开发的(查看小程序开发公司方法)

mysql不是内部命令如何解决

传输层 TCP首部-序号和确认号

Wechat applet_ 5. Page configuration

mysql的安装路径如何查看
随机推荐
Google Earth engine (GEE) - US native lithology data set
Hisilicon series mass production hardware commissioning record
部署Zabbix企业级分布式监控
Seat number of Pat grade B 1041 test (15 points)
Exclusive Xiaoman education, medical and aesthetic education, and no direct marketing by stages
Deploy ZABBIX enterprise level distributed monitoring
Mingming has just changed his profession and won five offers as soon as he graduated
【osg】osg开发(02)—基于MinGW编译构建osgQt库
操作成功的提示信息动态添加
Digital twin smart server: information security monitoring platform
32单片机——pwm波输出
Wechat applet_ 5. Global configuration
SQL 进阶挑战(26 - 30)
Easyexcel exclude display field-02
【Qt】一文总结QtCreator中MSVC编译套件
海思系列量产硬件调试记录
mysql分页查询如何优化
Can customer managers be relied on online? Is the fund safe
China uncoated intermittent catheter market trend report, technical innovation and market forecast
C # basic knowledge series 8 (const and readonly keywords)