插入流程调试通过

This commit is contained in:
建峰 2024-06-24 11:07:18 +08:00
parent 73f63fb411
commit 9a3a3f84a8
2 changed files with 3 additions and 3 deletions

View File

@ -1480,7 +1480,7 @@ static struct _tree_node* tree_trun_left_then_right(struct _tree* self, struct _
{
assert(self != NULL);
assert(root != NULL);
struct _tree_node* node = root->right;
struct _tree_node* node = root->left;
if(node != NULL)
{
tree_turn_left(self, node);
@ -1493,7 +1493,7 @@ static struct _tree_node* tree_trun_right_then_left(struct _tree* self, struct _
{
assert(self != NULL);
assert(root != NULL);
struct _tree_node* node = root->left;
struct _tree_node* node = root->right;
if(node != NULL)
{
tree_turn_right(self, node);

View File

@ -291,7 +291,7 @@ void test_tree_num(void)
tree->print_obj = print_num;
tree->compare = compare_num;
printf("\n\n----- test_queue_num -----\n");
printf("\n\n----- test_tree_num -----\n");
printf("----- insert -----\n");
for (i = 0; i < len; i++)