当前位置:网站首页>B-Tree
B-Tree
2022-06-22 02:42:00 【Cloud returns - Dusk】
Preface
I feel that YanWeiMin's data structure is about BTree The operation of is too ideal . In particular, the sibling nodes for deleting operations . Then move the maximum and minimum up . I feel very wordy . So I abstracted several meta operations . Both insert and delete can be converted by this . With down In fact, there is no need to find the minimum leaf node to exchange after the operation . You can delete the value all the way down To the bottom .
Meta operation
split operation
pull operation
down operation
check operation Check for conformity B-Tree The nature of the tree
Delete and insert operations ( recursive )
insert
Operational elements
- Current work node n
- State quantity tag
Definition
- n It's empty : Create a leaf node ,tag = 2
- tag = 0 : return
- tag =1 : Update child nodes ,tag=0
- tag = 2:pull operation
- check For false :split operation , tag = 2
- check It's true :tag=1
delete
Operational elements
- Current work node n
- State quantity tag
Definition
- After deleting check It's true :tag=0, return
- After deleting check For false :tag=1, return
- tag=0: return
- tag=1: Update child nodes
- check It's true tag=0 return
- Brother node is ⌈m/2⌉: Yes n node split, Again down operation ,tag=1
- Sibling node subtree >⌈m/2⌉: Yes n node split, Again down operation , Then the sub nodes split, Again pull operation .tag=1
边栏推荐
- Is the link of Hengtai securities VIP low commission account opening safe?
- Global exception handling
- 【2. 归并排序】
- 【4. 高精度加法】
- Brief analysis of application source code of neo4j intelligent supply chain
- Get to know unity3d (project structure, third-party plug-in of probuilder)
- Zap grammar sugar
- PostgreSQL fetches data according to the size of the time field
- 2022 brazing test simulation 100 questions and answers
- Graphconnect 2022 at a glance
猜你喜欢

Creating and extending XFS file system based on LVM

Penetration testing - logic vulnerability topic

An article thoroughly learns to draw data flow diagrams

Unity3d post process volume profile

The brand, products and services are working together. What will Dongfeng Nissan do next?

理想L9正式发布:8月底前开始交付 零售价45.98万元

EMC整改小技巧
![[1. quick sort]](/img/3d/66ce309761d0d79a5d09718a67def8.png)
[1. quick sort]

【5. 高精度减法】

最新發布:Neo4j 圖數據科學 GDS 2.0 和 AuraDS GA
随机推荐
Matlab learning notes (5) import and export of MATLAB data
Openjudge noi 1.13 46: octal to decimal
postgresql根据时间字段的大小来取数
Database daily question - day 19: top ranked travelers
Dynamically load assetdatabase of assets
mocklog_ Simulation log
Global exception handling
zap语法糖
Pytorch visualization
关于PMP考试,你想知道的知识都在这里了
Introduction to Apache ActiveMQ Artemis
The "cloud" end of the 6th world intelligence conference will be held soon
What programming does a child learn?
How to use tensorboard add_ histogram
How does the QT program implement the default selection of a behavior in the selected listwidget
并查集dsu
Rational Rose installation tutorial
华阳智能冲刺深交所:拟募资4亿 复星惟盈是股东
Extending kubernetes API with CRD
Technical exploration: 360 digital subjects won the first place in the world in ICDAR OCR competition