Add captions for all the animations.

This commit is contained in:
krahets
2023-02-26 19:22:46 +08:00
parent 7aa44d212c
commit 23cda5e225
13 changed files with 20 additions and 20 deletions

View File

@@ -310,7 +310,7 @@ AVL 树的独特之处在于「旋转 Rotation」的操作其可 **在不影
如下图所示(结点下方为「平衡因子」),从底至顶看,二叉树中首个失衡结点是 **结点 3**。我们聚焦在以该失衡结点为根结点的子树上,将该结点记为 `node` ,将其左子结点记为 `child` ,执行「右旋」操作。完成右旋后,该子树已经恢复平衡,并且仍然为二叉搜索树。
=== "<1>"
![avltree_right_rotate_step1](avl_tree.assets/avltree_right_rotate_step1.png)
![右旋操作步骤](avl_tree.assets/avltree_right_rotate_step1.png)
=== "<2>"
![avltree_right_rotate_step2](avl_tree.assets/avltree_right_rotate_step2.png)

View File

@@ -18,7 +18,7 @@
-`cur.val = num` ,说明找到目标结点,跳出循环并返回该结点即可;
=== "<1>"
![bst_search_step1](binary_search_tree.assets/bst_search_step1.png)
![查找结点步骤](binary_search_tree.assets/bst_search_step1.png)
=== "<2>"
![bst_search_step2](binary_search_tree.assets/bst_search_step2.png)
@@ -185,7 +185,7 @@
3. 使用 `nex` 替换待删除结点;
=== "<1>"
![bst_remove_case3_step1](binary_search_tree.assets/bst_remove_case3_step1.png)
![删除结点(度为 2步骤](binary_search_tree.assets/bst_remove_case3_step1.png)
=== "<2>"
![bst_remove_case3_step2](binary_search_tree.assets/bst_remove_case3_step2.png)