当前位置:网站首页>Arbre binaire équilibré [Arbre AVL] - Insérer et supprimer
Arbre binaire équilibré [Arbre AVL] - Insérer et supprimer
2022-07-07 23:37:00 【YYY Zxc】
1、Longueur moyenne de la recherche(Hauteur de l'arbre):
2、Facteur d'équilibre du noeud=Hauteur du sous - arbre gauche-Hauteur du sous - arbre droit
Le facteur d'équilibre d'un noeud d'arbre binaire équilibré ne peut être que0,1Ou-1

2、Insérer
2.1 L'objet de chaque ajustement est“Sous - arbre de déséquilibre minimal”

2.2 Ajuster le Sous - arbre de déséquilibre minimalA
①LL【AL'enfant gauche tourne vers le haut à droite】:InAL'insertion dans le Sous - arbre gauche de l'enfant gauche provoque un déséquilibre
②RR【AL'enfant droit tourne à gauche】:InAL'insertion dans le Sous - arbre droit de l'enfant droit provoque un déséquilibre

③LR【AL'enfant de gauche l'enfant de droite tourne d'abord à gauche, puis à droite】:
InAL'insertion dans le Sous - arbre droit de l'enfant de gauche provoque un déséquilibre

④RL【A L'enfant droit l'enfant gauche tourne d'abord à droite, puis à gauche 】:
InAL'insertion dans le Sous - arbre gauche de l'enfant droit provoque un déséquilibre
【Note:】 Chaque rotation fait de cet enfant un père , Papa devient un enfant.
【Note:】Seuls les enfants de gauche peuvent pivoter vers le haut à droite
Seul l'enfant droit peut tourner à gauche

3、Supprimer

边栏推荐
- Turbo introder common scripts
- 城联优品作为新力量初注入,相关上市公司股价应声上涨150%
- SAP 内存参数调优过程
- B_QuRT_User_Guide(38)
- JS get the key and value of the object
- Markdown
- One week learning summary of STL Standard Template Library
- List. How to achieve ascending and descending sort() 2020.8.6
- Fibonacci number of dynamic programming
- 8.31 Tencent interview
猜你喜欢

Digital procurement management system for fresh food industry: help fresh food enterprises solve procurement problems and implement online procurement throughout the process

List. How to achieve ascending and descending sort() 2020.8.6

SAP HR reward and punishment information export

C simple question one

SAP HR 家庭成员信息
![给出一个数组,如 [7864, 284, 347, 7732, 8498],现在需要将数组中的数字拼接起来,返回「最大的可能拼出的数字」](/img/21/2e99dd6173ab4925ec22290cd4a357.png)
给出一个数组,如 [7864, 284, 347, 7732, 8498],现在需要将数组中的数字拼接起来,返回「最大的可能拼出的数字」

Senior programmers must know and master. This article explains in detail the principle of MySQL master-slave synchronization, and recommends collecting

【实验分享】通过Console口登录到Cisco设备

SAP HR 社会工作经历 0023

Oracle database backup and recovery
随机推荐
Unity3d learning notes 5 - create sub mesh
Open source hardware small project: anxinco esp-c3f control ws2812
USB (XVIII) 2022-04-17
Oracle statistics by time
v-for遍历对象
Solution of intelligent supply chain collaboration platform in electronic equipment industry: solve inefficiency and enable digital upgrading of industry
Extended tree (I) - graphic analysis and C language implementation
List. How to achieve ascending and descending sort() 2020.8.6
B_ QuRT_ User_ Guide(37)
B_QuRT_User_Guide(37)
Navicat connects Oracle
IDEA 2021.3. X cracking
产业共融新势能,城链科技数字峰会厦门站成功举办
0-1 knapsack problem
MATLAB signal processing [Q & A essays · 2]
移动端异构运算技术 - GPU OpenCL 编程(基础篇)
C simple question one
[STM32 + esp-12s connect Tencent cloud IOT development platform 1] creation of cloud platform and burning of at firmware
UE4_ Ue5 combined with Logitech handle (F710) use record
The 19th Zhejiang Provincial College Programming Contest 2022 f.easyfix chairman tree