Fix node removal.
This commit is contained in:
parent
bebb8af611
commit
0126efb6f6
1 changed files with 2 additions and 2 deletions
|
@ -221,8 +221,8 @@
|
|||
(bst-node-right n)
|
||||
#f))
|
||||
(if (< k nk)
|
||||
(set-bst-node-left (loop (bst-node-left n)))
|
||||
(set-bst-node-right (loop (bst-node-right n))))))
|
||||
(set-bst-node-left n (loop (bst-node-left n)))
|
||||
(set-bst-node-right n (loop (bst-node-right n))))))
|
||||
(if (and (not (null? nos))
|
||||
(car nos))
|
||||
#f
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue