Skip to content

Commit

Permalink
fix _posts/2024-10-10-STL\345\233\276\350\247\243.md
Browse files Browse the repository at this point in the history
  • Loading branch information
hxf0223 committed Oct 10, 2024
1 parent 6cb4db7 commit e780c01
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions _posts/2024-10-10-STL图解.md
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ class priority_queue

## 8. rb_tree ##

![RB-tree](/asserts/images/cpp/2023-01-14-STL图解/RB-tree.png)
![RB-tree](/assets/images/cpp/2023-01-14-STL图解/RB-tree.png)

红黑树(英语:Red–black tree)是一种自平衡二叉查找树,红黑树是每个节点都带有颜色属性的二叉查找树,颜色为红色或黑色。在二叉查找树强制一般要求以外,对于任何有效的红黑树我们增加了如下的额外要求:

Expand All @@ -566,7 +566,7 @@ class priority_queue
4. 每个红色节点必须有两个黑色的子节点。(或者说从每个叶子到根的所有路径上不能有两个连续的红色节点。)(或者说不存在两个相邻的红色节点,相邻指两个节点是父子关系。)(或者说红色节点的父节点和子节点均是黑色的。)
5. 从任一节点到其每个叶子的所有简单路径都包含相同数目的黑色节点。

![RB-tree2](/asserts/images/cpp/2023-01-14-STL图解/rb_tree.drawio.svg)
![RB-tree2](/assets/images/cpp/2023-01-14-STL图解/rb_tree.drawio.svg)

### 8.1. set, multiset[^3] ###

Expand Down

0 comments on commit e780c01

Please sign in to comment.