mirror of
https://gitee.com/apaki/unicstl.git
synced 2025-07-03 23:56:54 +08:00
插入流程调试通过
This commit is contained in:
parent
73f63fb411
commit
9a3a3f84a8
@ -1480,7 +1480,7 @@ static struct _tree_node* tree_trun_left_then_right(struct _tree* self, struct _
|
|||||||
{
|
{
|
||||||
assert(self != NULL);
|
assert(self != NULL);
|
||||||
assert(root != NULL);
|
assert(root != NULL);
|
||||||
struct _tree_node* node = root->right;
|
struct _tree_node* node = root->left;
|
||||||
if(node != NULL)
|
if(node != NULL)
|
||||||
{
|
{
|
||||||
tree_turn_left(self, node);
|
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(self != NULL);
|
||||||
assert(root != NULL);
|
assert(root != NULL);
|
||||||
struct _tree_node* node = root->left;
|
struct _tree_node* node = root->right;
|
||||||
if(node != NULL)
|
if(node != NULL)
|
||||||
{
|
{
|
||||||
tree_turn_right(self, node);
|
tree_turn_right(self, node);
|
||||||
|
@ -291,7 +291,7 @@ void test_tree_num(void)
|
|||||||
tree->print_obj = print_num;
|
tree->print_obj = print_num;
|
||||||
tree->compare = compare_num;
|
tree->compare = compare_num;
|
||||||
|
|
||||||
printf("\n\n----- test_queue_num -----\n");
|
printf("\n\n----- test_tree_num -----\n");
|
||||||
|
|
||||||
printf("----- insert -----\n");
|
printf("----- insert -----\n");
|
||||||
for (i = 0; i < len; i++)
|
for (i = 0; i < len; i++)
|
||||||
|
Loading…
Reference in New Issue
Block a user