mirror of
https://gitee.com/apaki/unicstl.git
synced 2025-05-18 03:51:35 +08:00
可以确认,插入上没有问题!
This commit is contained in:
parent
49b8c92ad1
commit
ca4bf14b0c
19
src/tree.c
19
src/tree.c
@ -1703,7 +1703,26 @@ bool tree_avl_insert(struct _tree* self, void* obj)
|
|||||||
tree_node_free(node);
|
tree_node_free(node);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// printf("--------------------\n");
|
||||||
|
// printf("insert : \n");
|
||||||
|
// self->print_obj(node->obj);
|
||||||
|
// printf("\n");
|
||||||
|
|
||||||
|
// printf("all data : \n");
|
||||||
|
// self->preorder(self, self->_root);
|
||||||
|
// printf("\n");
|
||||||
|
|
||||||
self->rebalance(self, root);
|
self->rebalance(self, root);
|
||||||
|
|
||||||
|
// printf("parent_path: \n");
|
||||||
|
// struct _tree_node * tmp = node;
|
||||||
|
// do
|
||||||
|
// {
|
||||||
|
// self->print_obj(tmp->obj);
|
||||||
|
// tmp = tmp->parent;
|
||||||
|
// }while(tmp != NULL);
|
||||||
|
// printf("\n");
|
||||||
}
|
}
|
||||||
self->_size++;
|
self->_size++;
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user