Files
912-notes/thu_dsa/chp8/RB-tree.md

29 lines
663 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
Conclusion on Red-Black Tree
===========================
## 红黑树的概念
> 为什么需要红黑树?
与传统BBST相比一次调整操作只进行$O(1)$的拓扑结构调整,可作为持久数据结构(persistent structure)。
> 红黑树的基本概念。
> 红黑树与4阶B树
提升变换
> 为什么红黑树是平衡树?
## 红黑树的操作
> 插入算法
与B树的对比通过B树来理解。至多一次重构操作可能有$O(logn)$次重新染色
> 删除算法
相当复杂,分为四种情况。还是至多$O(1)$次重构操作,但是至多有$O(logn)$次重新染色。
理解方法还是按照B树来理解