mirror of
https://github.com/krahets/hello-algo.git
synced 2025-11-02 12:58:42 +08:00
Fix the return type of binary search tree and avl tree
This commit is contained in:
@ -180,9 +180,9 @@
|
||||
|
||||
当待删除节点的子节点数量 $= 2$ 时,删除操作分为三步:
|
||||
|
||||
1. 找到待删除节点在“中序遍历序列”中的下一个节点,记为 nex;
|
||||
2. 在树中递归删除节点 `nex` ;
|
||||
3. 使用 `nex` 替换待删除节点;
|
||||
1. 找到待删除节点在“中序遍历序列”中的下一个节点,记为 `tmp` ;
|
||||
2. 在树中递归删除节点 `tmp` ;
|
||||
3. 用 `tmp` 的值覆盖待删除节点的值;
|
||||
|
||||
=== "<1>"
|
||||

|
||||
|
||||
Reference in New Issue
Block a user