添加备注

This commit is contained in:
建峰 2024-06-25 18:16:07 +08:00
parent bd3258010a
commit 5f6790687f

View File

@ -1089,13 +1089,18 @@ static bool tree_rb_rebalance(struct _tree* self, struct _tree_node* node)
struct _tree_node* uncle = NULL; struct _tree_node* uncle = NULL;
/** /**
* @brief * @brief
* *
* * [1-3][4-6]
*
*
* *
* | | | | * | | | |
* | ---- | --- | -------- | * | ---- | --- | -------- |
* | 1 | * | 0 | |
* | 1 | |
* | 2 | | /
* | 3 | | /
*/ */
while(node->parent != NULL && node->parent->color == RBT_RED) while(node->parent != NULL && node->parent->color == RBT_RED)
{ {