fix(package): [tree] apply the replacement root on deletion (#407)

This commit is contained in:
Rupayon Haldar authored and GitHub committed 2026-10-31 09:56:26 +08:00
1 parent 03695c886c
commit 9f7d939e5a
3 files changed
+70 -2

No files matched your search

+1 -1
View File
@@ -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