This commit is contained in:
zhangwk 2023-07-19 17:17:32 +08:00
parent facc1e87d5
commit 913da2bb09

View File

@ -102,7 +102,20 @@ public:
}
void erase(T data) {
// 待删除节点
tree_node<T>* node = find(data);
// 删除节点的左子树
tree_node<T>* sub_tree_left = node->left;
// 删除节点的右子树
tree_node<T>* sub_tree_right = node->right;
// 左子树 值
sub_tree_left->data.front();
tree_node<T>* current = sub_tree_right;
while () {
}
}
void update(T old_data, T new_data) {