mirror of
https://github.com/duke-git/lancet.git
synced 2026-11-16 05:12:11 +08:00
fix(package): [tree] apply the replacement root on deletion (#407)
This commit is contained in:
1 parent
03695c886c
commit
9f7d939e5a
3 files changed
+70
-2
No files matched your search
@@ -40,7 +40,7 @@ func (t *BSTree[T]) Insert(data T) {
|
||||
|
||||
// DeletetNode delete data into BSTree
|
||||
func (t *BSTree[T]) Delete(data T) {
|
||||
deleteTreeNode(t.root, data, t.comparator)
|
||||
t.root = deleteTreeNode(t.root, data, t.comparator)
|
||||
}
|
||||
|
||||
// NodeLevel get node level in BSTree
|
||||
|
||||
Reference in new issue
Block a user