Skip to content

Commit 9896f57

Browse files
committed
BinarySearchTree delete was wrong
1 parent f6f62d1 commit 9896f57

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

data-structures/binary-tree/binary-search-tree.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ func bst_delete(root *node, val int) *node {
7575
} else {
7676
// node with two children
7777
d := inorderSuccessor(root)
78-
root.val = d.val
7978
root.right = bst_delete(root.right, d.val)
8079
}
8180
}

0 commit comments

Comments
 (0)