当前位置:网站首页>平衡二叉树(AVL) ~
平衡二叉树(AVL) ~
2022-07-26 05:43:00 【柯基@】
平衡二叉树实际上是升级版的二叉排序树,它提高了查询的效率
- 平衡因子:其左子树高度减去右子树高度的差,有正有负还有零
- 平衡二叉树:每个结点的平衡因子的绝对值不大于 1
重点 :平衡二叉树的调整
- LR,中间结点 L,根结点 R
- RL,中间结点 R,根结点 L
- LL,根结点 R
- RR,根结点 L
eg:以关键字序列{16,3,7,11,9,26,18,14,15}构造一棵 AVL树(平衡二叉树),构造完成后依次删除结点16、15、11。给出详细操作过程,题目中在结点上方标出平衡因子,用虚线框出需要进行平衡调整的3个结点。
答案:
删除前
删除后
边栏推荐
- 【个人总结】2022.7.24周结
- TZC 1283: simple sorting - function method
- Mba-day29 arithmetic - preliminary understanding of absolute value
- Circular structure practice
- nn.Moudle模块-创建神经网络结构需要注意的细节
- [STM32 series summary] blogger's way to quickly advance STM32 in actual combat (continuous update)
- SIP账号注册的SIP软电话的使用和常见问题
- Polymer physics test question bank
- Rocbossphp free open source light community system
- Development to testing: a six-year road to automation from scratch
猜你喜欢
随机推荐
Redis发布订阅
NFT in the eyes of blackash: the platform is crying for slaughter, and users send money to the door
Basic methods of realizing licensing function in C language
How can red star Macalline design cloud upgrade the traditional home furnishing industry in ten minutes to produce film and television level interior design effects
Three graduates, three years of experience in embedded software
虚拟偶像代言产品出问题谁负责? 且听律师分析
高分子物理试题库
FTP实验及概述
高分子物理知识点
MongonDB API使用
Benji Bananas 开启第二季边玩边赚奖励活动,支持使用多张 Benji 通行证!
Application and value of IVR in VoIP telephone system
高频电子线路复习考试题及答案
Select sort / insert sort / bubble sort
No EGL Display 报错解决
C language - Advanced pointer
Yuancosmos provides a digital social platform for fashion design display
Is it really hopeless to choose electronic engineering and be discouraged?
我又发现了超赞的软硬件项目,全部开源
循环结构 practice









