Fix the return type of binary search tree and avl tree

This commit is contained in:
krahets
2023-04-14 05:47:20 +08:00
parent 9c9c8b7574
commit f7ae9c8a02
24 changed files with 247 additions and 451 deletions

View File

@ -180,9 +180,9 @@
当待删除节点的子节点数量 $= 2$ 时,删除操作分为三步:
1. 找到待删除节点在“中序遍历序列”中的下一个节点,记为 nex
2. 在树中递归删除节点 `nex`
3. 使用 `nex` 替换待删除节点;
1. 找到待删除节点在“中序遍历序列”中的下一个节点,记为 `tmp`
2. 在树中递归删除节点 `tmp`
3. 用 `tmp` 的值覆盖待删除节点的值
=== "<1>"
![bst_remove_case3_step1](binary_search_tree.assets/bst_remove_case3_step1.png)