可以确认,插入上没有问题!

This commit is contained in:
建峰 2024-06-24 13:14:07 +08:00
parent 49b8c92ad1
commit ca4bf14b0c

View File

@ -1703,7 +1703,26 @@ bool tree_avl_insert(struct _tree* self, void* obj)
tree_node_free(node);
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);
// 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++;
return true;