diff --git a/docs/chapter_appendix/installation.assets/vscode_extension_installation.png b/docs/chapter_appendix/installation.assets/vscode_extension_installation.png index 0efab8178..3eabc83d0 100644 Binary files a/docs/chapter_appendix/installation.assets/vscode_extension_installation.png and b/docs/chapter_appendix/installation.assets/vscode_extension_installation.png differ diff --git a/docs/chapter_appendix/installation.assets/vscode_installation.png b/docs/chapter_appendix/installation.assets/vscode_installation.png index 87f28b8bb..b0e09d459 100644 Binary files a/docs/chapter_appendix/installation.assets/vscode_installation.png and b/docs/chapter_appendix/installation.assets/vscode_installation.png differ diff --git a/docs/chapter_array_and_linkedlist/linked_list.assets/linkedlist_insert_node.png b/docs/chapter_array_and_linkedlist/linked_list.assets/linkedlist_insert_node.png index 1f6d24dce..64672d41e 100644 Binary files a/docs/chapter_array_and_linkedlist/linked_list.assets/linkedlist_insert_node.png and b/docs/chapter_array_and_linkedlist/linked_list.assets/linkedlist_insert_node.png differ diff --git a/docs/chapter_array_and_linkedlist/linked_list.assets/linkedlist_remove_node.png b/docs/chapter_array_and_linkedlist/linked_list.assets/linkedlist_remove_node.png index 670db4a3f..68c72b97f 100644 Binary files a/docs/chapter_array_and_linkedlist/linked_list.assets/linkedlist_remove_node.png and b/docs/chapter_array_and_linkedlist/linked_list.assets/linkedlist_remove_node.png differ diff --git a/docs/chapter_computational_complexity/space_complexity.assets/space_complexity_common_types.png b/docs/chapter_computational_complexity/space_complexity.assets/space_complexity_common_types.png index 1f0d8daee..217dc6f03 100644 Binary files a/docs/chapter_computational_complexity/space_complexity.assets/space_complexity_common_types.png and b/docs/chapter_computational_complexity/space_complexity.assets/space_complexity_common_types.png differ diff --git a/docs/chapter_computational_complexity/space_complexity.assets/space_complexity_exponential.png b/docs/chapter_computational_complexity/space_complexity.assets/space_complexity_exponential.png index 560571067..98730370d 100644 Binary files a/docs/chapter_computational_complexity/space_complexity.assets/space_complexity_exponential.png and b/docs/chapter_computational_complexity/space_complexity.assets/space_complexity_exponential.png differ diff --git a/docs/chapter_computational_complexity/space_complexity.assets/space_complexity_recursive_quadratic.png b/docs/chapter_computational_complexity/space_complexity.assets/space_complexity_recursive_quadratic.png index 25d4dcc3d..da696e960 100644 Binary files a/docs/chapter_computational_complexity/space_complexity.assets/space_complexity_recursive_quadratic.png and b/docs/chapter_computational_complexity/space_complexity.assets/space_complexity_recursive_quadratic.png differ diff --git a/docs/chapter_computational_complexity/time_complexity.assets/asymptotic_upper_bound.png b/docs/chapter_computational_complexity/time_complexity.assets/asymptotic_upper_bound.png index 8c69831ca..d0dddbb05 100644 Binary files a/docs/chapter_computational_complexity/time_complexity.assets/asymptotic_upper_bound.png and b/docs/chapter_computational_complexity/time_complexity.assets/asymptotic_upper_bound.png differ diff --git a/docs/chapter_computational_complexity/time_complexity.assets/time_complexity_common_types.png b/docs/chapter_computational_complexity/time_complexity.assets/time_complexity_common_types.png index 500e1a7e0..c1ab027e0 100644 Binary files a/docs/chapter_computational_complexity/time_complexity.assets/time_complexity_common_types.png and b/docs/chapter_computational_complexity/time_complexity.assets/time_complexity_common_types.png differ diff --git a/docs/chapter_computational_complexity/time_complexity.assets/time_complexity_constant_linear_quadratic.png b/docs/chapter_computational_complexity/time_complexity.assets/time_complexity_constant_linear_quadratic.png index d9f943f14..99758187f 100644 Binary files a/docs/chapter_computational_complexity/time_complexity.assets/time_complexity_constant_linear_quadratic.png and b/docs/chapter_computational_complexity/time_complexity.assets/time_complexity_constant_linear_quadratic.png differ diff --git a/docs/chapter_computational_complexity/time_complexity.assets/time_complexity_exponential.png b/docs/chapter_computational_complexity/time_complexity.assets/time_complexity_exponential.png index 69e34bab3..bf9ef1b37 100644 Binary files a/docs/chapter_computational_complexity/time_complexity.assets/time_complexity_exponential.png and b/docs/chapter_computational_complexity/time_complexity.assets/time_complexity_exponential.png differ diff --git a/docs/chapter_computational_complexity/time_complexity.assets/time_complexity_factorial.png b/docs/chapter_computational_complexity/time_complexity.assets/time_complexity_factorial.png index 50ce0a85b..52bf0c1c2 100644 Binary files a/docs/chapter_computational_complexity/time_complexity.assets/time_complexity_factorial.png and b/docs/chapter_computational_complexity/time_complexity.assets/time_complexity_factorial.png differ diff --git a/docs/chapter_computational_complexity/time_complexity.assets/time_complexity_logarithmic.png b/docs/chapter_computational_complexity/time_complexity.assets/time_complexity_logarithmic.png index 48fa8c163..739c386f4 100644 Binary files a/docs/chapter_computational_complexity/time_complexity.assets/time_complexity_logarithmic.png and b/docs/chapter_computational_complexity/time_complexity.assets/time_complexity_logarithmic.png differ diff --git a/docs/chapter_computational_complexity/time_complexity.assets/time_complexity_logarithmic_linear.png b/docs/chapter_computational_complexity/time_complexity.assets/time_complexity_logarithmic_linear.png index 20daacbbc..3ae59496c 100644 Binary files a/docs/chapter_computational_complexity/time_complexity.assets/time_complexity_logarithmic_linear.png and b/docs/chapter_computational_complexity/time_complexity.assets/time_complexity_logarithmic_linear.png differ diff --git a/docs/chapter_data_structure/number_encoding.assets/1s_2s_complement.png b/docs/chapter_data_structure/number_encoding.assets/1s_2s_complement.png index bc1725be0..369b894ce 100644 Binary files a/docs/chapter_data_structure/number_encoding.assets/1s_2s_complement.png and b/docs/chapter_data_structure/number_encoding.assets/1s_2s_complement.png differ diff --git a/docs/chapter_data_structure/number_encoding.assets/ieee_754_float.png b/docs/chapter_data_structure/number_encoding.assets/ieee_754_float.png index 55f1b89f9..b0acc827e 100644 Binary files a/docs/chapter_data_structure/number_encoding.assets/ieee_754_float.png and b/docs/chapter_data_structure/number_encoding.assets/ieee_754_float.png differ diff --git a/docs/chapter_divide_and_conquer/build_binary_tree_problem.md b/docs/chapter_divide_and_conquer/build_binary_tree_problem.md index 69c68c53e..1bb904589 100644 --- a/docs/chapter_divide_and_conquer/build_binary_tree_problem.md +++ b/docs/chapter_divide_and_conquer/build_binary_tree_problem.md @@ -2,7 +2,7 @@ !!! question - 给定一棵二叉树的前序遍历 `preorder` 和中序遍历 `inorder` ,请从中构建二叉树,返回二叉树的根节点。假设二叉树中没有值重复的节点。 + 给定一棵二叉树的前序遍历 `preorder` 和中序遍历 `inorder` ,请从中构建二叉树,返回二叉树的根节点。假设二叉树中没有值重复的节点,如下图所示。 ![构建二叉树的示例数据](build_binary_tree_problem.assets/build_tree_example.png) diff --git a/docs/chapter_dynamic_programming/edit_distance_problem.assets/edit_distance_decision_tree.png b/docs/chapter_dynamic_programming/edit_distance_problem.assets/edit_distance_decision_tree.png index 6459d64d2..5b67c8ace 100644 Binary files a/docs/chapter_dynamic_programming/edit_distance_problem.assets/edit_distance_decision_tree.png and b/docs/chapter_dynamic_programming/edit_distance_problem.assets/edit_distance_decision_tree.png differ diff --git a/docs/chapter_dynamic_programming/intro_to_dynamic_programming.assets/climbing_stairs_state_transfer.png b/docs/chapter_dynamic_programming/intro_to_dynamic_programming.assets/climbing_stairs_state_transfer.png index bd2166a24..6b28c0930 100644 Binary files a/docs/chapter_dynamic_programming/intro_to_dynamic_programming.assets/climbing_stairs_state_transfer.png and b/docs/chapter_dynamic_programming/intro_to_dynamic_programming.assets/climbing_stairs_state_transfer.png differ diff --git a/docs/chapter_dynamic_programming/summary.md b/docs/chapter_dynamic_programming/summary.md index d6fd3c9a4..5d422a9d4 100644 --- a/docs/chapter_dynamic_programming/summary.md +++ b/docs/chapter_dynamic_programming/summary.md @@ -14,7 +14,7 @@ - 0-1 背包的状态定义为前 $i$ 个物品在剩余容量为 $c$ 的背包中的最大价值。根据不放入背包和放入背包两种决策,可得到最优子结构,并构建出状态转移方程。在空间优化中,由于每个状态依赖正上方和左上方的状态,因此需要倒序遍历列表,避免左上方状态被覆盖。 - 完全背包问题的每种物品的选取数量无限制,因此选择放入物品的状态转移与 0-1 背包问题不同。由于状态依赖正上方和正左方的状态,因此在空间优化中应当正序遍历。 - 零钱兑换问题是完全背包问题的一个变种。它从求“最大”价值变为求“最小”硬币数量,因此状态转移方程中的 $\max()$ 应改为 $\min()$ 。从追求“不超过”背包容量到追求“恰好”凑出目标金额,因此使用 $amt + 1$ 来表示“无法凑出目标金额”的无效解。 -- 零钱兑换 II 问题从求“最少硬币数量”改为求“硬币组合数量”,状态转移方程相应地从 $\min()$ 改为求和运算符。 +- 零钱兑换问题 II 从求“最少硬币数量”改为求“硬币组合数量”,状态转移方程相应地从 $\min()$ 改为求和运算符。 **编辑距离问题** diff --git a/docs/chapter_graph/graph_operations.assets/adjacency_matrix_add_vertex.png b/docs/chapter_graph/graph_operations.assets/adjacency_matrix_add_vertex.png index a76fa8a95..87d03db82 100644 Binary files a/docs/chapter_graph/graph_operations.assets/adjacency_matrix_add_vertex.png and b/docs/chapter_graph/graph_operations.assets/adjacency_matrix_add_vertex.png differ diff --git a/docs/chapter_graph/graph_traversal.assets/graph_bfs.png b/docs/chapter_graph/graph_traversal.assets/graph_bfs.png index cc46b9031..96a68291f 100644 Binary files a/docs/chapter_graph/graph_traversal.assets/graph_bfs.png and b/docs/chapter_graph/graph_traversal.assets/graph_bfs.png differ diff --git a/docs/chapter_graph/graph_traversal.assets/graph_bfs_step10.png b/docs/chapter_graph/graph_traversal.assets/graph_bfs_step10.png index 742758028..e36b33d39 100644 Binary files a/docs/chapter_graph/graph_traversal.assets/graph_bfs_step10.png and b/docs/chapter_graph/graph_traversal.assets/graph_bfs_step10.png differ diff --git a/docs/chapter_graph/graph_traversal.assets/graph_bfs_step11.png b/docs/chapter_graph/graph_traversal.assets/graph_bfs_step11.png index b8b49674b..08ee4e9d0 100644 Binary files a/docs/chapter_graph/graph_traversal.assets/graph_bfs_step11.png and b/docs/chapter_graph/graph_traversal.assets/graph_bfs_step11.png differ diff --git a/docs/chapter_graph/graph_traversal.assets/graph_bfs_step2.png b/docs/chapter_graph/graph_traversal.assets/graph_bfs_step2.png index dd01ed58d..55f1b3da0 100644 Binary files a/docs/chapter_graph/graph_traversal.assets/graph_bfs_step2.png and b/docs/chapter_graph/graph_traversal.assets/graph_bfs_step2.png differ diff --git a/docs/chapter_graph/graph_traversal.assets/graph_bfs_step3.png b/docs/chapter_graph/graph_traversal.assets/graph_bfs_step3.png index c584d6f1c..1b98f4ce7 100644 Binary files a/docs/chapter_graph/graph_traversal.assets/graph_bfs_step3.png and b/docs/chapter_graph/graph_traversal.assets/graph_bfs_step3.png differ diff --git a/docs/chapter_graph/graph_traversal.assets/graph_bfs_step4.png b/docs/chapter_graph/graph_traversal.assets/graph_bfs_step4.png index d255fccb4..861f87411 100644 Binary files a/docs/chapter_graph/graph_traversal.assets/graph_bfs_step4.png and b/docs/chapter_graph/graph_traversal.assets/graph_bfs_step4.png differ diff --git a/docs/chapter_graph/graph_traversal.assets/graph_bfs_step5.png b/docs/chapter_graph/graph_traversal.assets/graph_bfs_step5.png index ae6ff3b53..8f1b55608 100644 Binary files a/docs/chapter_graph/graph_traversal.assets/graph_bfs_step5.png and b/docs/chapter_graph/graph_traversal.assets/graph_bfs_step5.png differ diff --git a/docs/chapter_graph/graph_traversal.assets/graph_bfs_step6.png b/docs/chapter_graph/graph_traversal.assets/graph_bfs_step6.png index 930ff0fbe..762b6456e 100644 Binary files a/docs/chapter_graph/graph_traversal.assets/graph_bfs_step6.png and b/docs/chapter_graph/graph_traversal.assets/graph_bfs_step6.png differ diff --git a/docs/chapter_graph/graph_traversal.assets/graph_bfs_step7.png b/docs/chapter_graph/graph_traversal.assets/graph_bfs_step7.png index d1650e7d8..1b489b4b9 100644 Binary files a/docs/chapter_graph/graph_traversal.assets/graph_bfs_step7.png and b/docs/chapter_graph/graph_traversal.assets/graph_bfs_step7.png differ diff --git a/docs/chapter_graph/graph_traversal.assets/graph_bfs_step8.png b/docs/chapter_graph/graph_traversal.assets/graph_bfs_step8.png index 7077bd86f..d5b9d113d 100644 Binary files a/docs/chapter_graph/graph_traversal.assets/graph_bfs_step8.png and b/docs/chapter_graph/graph_traversal.assets/graph_bfs_step8.png differ diff --git a/docs/chapter_graph/graph_traversal.assets/graph_bfs_step9.png b/docs/chapter_graph/graph_traversal.assets/graph_bfs_step9.png index 503379e8e..d9018e38a 100644 Binary files a/docs/chapter_graph/graph_traversal.assets/graph_bfs_step9.png and b/docs/chapter_graph/graph_traversal.assets/graph_bfs_step9.png differ diff --git a/docs/chapter_graph/graph_traversal.assets/graph_dfs.png b/docs/chapter_graph/graph_traversal.assets/graph_dfs.png index 5ff02d338..47939ed07 100644 Binary files a/docs/chapter_graph/graph_traversal.assets/graph_dfs.png and b/docs/chapter_graph/graph_traversal.assets/graph_dfs.png differ diff --git a/docs/chapter_graph/graph_traversal.assets/graph_dfs_step1.png b/docs/chapter_graph/graph_traversal.assets/graph_dfs_step1.png index e6a2f7dda..5475e3c61 100644 Binary files a/docs/chapter_graph/graph_traversal.assets/graph_dfs_step1.png and b/docs/chapter_graph/graph_traversal.assets/graph_dfs_step1.png differ diff --git a/docs/chapter_graph/graph_traversal.assets/graph_dfs_step10.png b/docs/chapter_graph/graph_traversal.assets/graph_dfs_step10.png index a8e256b03..c749a5f85 100644 Binary files a/docs/chapter_graph/graph_traversal.assets/graph_dfs_step10.png and b/docs/chapter_graph/graph_traversal.assets/graph_dfs_step10.png differ diff --git a/docs/chapter_graph/graph_traversal.assets/graph_dfs_step11.png b/docs/chapter_graph/graph_traversal.assets/graph_dfs_step11.png index 443c1d926..824e8d0cb 100644 Binary files a/docs/chapter_graph/graph_traversal.assets/graph_dfs_step11.png and b/docs/chapter_graph/graph_traversal.assets/graph_dfs_step11.png differ diff --git a/docs/chapter_graph/graph_traversal.assets/graph_dfs_step2.png b/docs/chapter_graph/graph_traversal.assets/graph_dfs_step2.png index 375086ab8..656d08c6c 100644 Binary files a/docs/chapter_graph/graph_traversal.assets/graph_dfs_step2.png and b/docs/chapter_graph/graph_traversal.assets/graph_dfs_step2.png differ diff --git a/docs/chapter_graph/graph_traversal.assets/graph_dfs_step3.png b/docs/chapter_graph/graph_traversal.assets/graph_dfs_step3.png index 37ae3c96b..e69a50d3d 100644 Binary files a/docs/chapter_graph/graph_traversal.assets/graph_dfs_step3.png and b/docs/chapter_graph/graph_traversal.assets/graph_dfs_step3.png differ diff --git a/docs/chapter_graph/graph_traversal.assets/graph_dfs_step4.png b/docs/chapter_graph/graph_traversal.assets/graph_dfs_step4.png index 496e1541e..a0ff56f92 100644 Binary files a/docs/chapter_graph/graph_traversal.assets/graph_dfs_step4.png and b/docs/chapter_graph/graph_traversal.assets/graph_dfs_step4.png differ diff --git a/docs/chapter_graph/graph_traversal.assets/graph_dfs_step5.png b/docs/chapter_graph/graph_traversal.assets/graph_dfs_step5.png index 60a0e7e24..7c174e366 100644 Binary files a/docs/chapter_graph/graph_traversal.assets/graph_dfs_step5.png and b/docs/chapter_graph/graph_traversal.assets/graph_dfs_step5.png differ diff --git a/docs/chapter_graph/graph_traversal.assets/graph_dfs_step6.png b/docs/chapter_graph/graph_traversal.assets/graph_dfs_step6.png index f3dca4ba3..23a01664a 100644 Binary files a/docs/chapter_graph/graph_traversal.assets/graph_dfs_step6.png and b/docs/chapter_graph/graph_traversal.assets/graph_dfs_step6.png differ diff --git a/docs/chapter_graph/graph_traversal.assets/graph_dfs_step7.png b/docs/chapter_graph/graph_traversal.assets/graph_dfs_step7.png index a8b281d93..bc485b358 100644 Binary files a/docs/chapter_graph/graph_traversal.assets/graph_dfs_step7.png and b/docs/chapter_graph/graph_traversal.assets/graph_dfs_step7.png differ diff --git a/docs/chapter_graph/graph_traversal.assets/graph_dfs_step8.png b/docs/chapter_graph/graph_traversal.assets/graph_dfs_step8.png index c93a6a61b..b2d529514 100644 Binary files a/docs/chapter_graph/graph_traversal.assets/graph_dfs_step8.png and b/docs/chapter_graph/graph_traversal.assets/graph_dfs_step8.png differ diff --git a/docs/chapter_graph/graph_traversal.assets/graph_dfs_step9.png b/docs/chapter_graph/graph_traversal.assets/graph_dfs_step9.png index aafc1062e..1a114f14c 100644 Binary files a/docs/chapter_graph/graph_traversal.assets/graph_dfs_step9.png and b/docs/chapter_graph/graph_traversal.assets/graph_dfs_step9.png differ diff --git a/docs/chapter_greedy/fractional_knapsack_problem.assets/fractional_knapsack_example.png b/docs/chapter_greedy/fractional_knapsack_problem.assets/fractional_knapsack_example.png index 134362c73..dc2285f6b 100644 Binary files a/docs/chapter_greedy/fractional_knapsack_problem.assets/fractional_knapsack_example.png and b/docs/chapter_greedy/fractional_knapsack_problem.assets/fractional_knapsack_example.png differ diff --git a/docs/chapter_greedy/greedy_algorithm.assets/coin_change_greedy_strategy.png b/docs/chapter_greedy/greedy_algorithm.assets/coin_change_greedy_strategy.png index b2daea2c7..1f8b4e8d2 100644 Binary files a/docs/chapter_greedy/greedy_algorithm.assets/coin_change_greedy_strategy.png and b/docs/chapter_greedy/greedy_algorithm.assets/coin_change_greedy_strategy.png differ diff --git a/docs/chapter_greedy/greedy_algorithm.assets/coin_change_greedy_vs_dp.png b/docs/chapter_greedy/greedy_algorithm.assets/coin_change_greedy_vs_dp.png index d7cb513c7..d13ed01a1 100644 Binary files a/docs/chapter_greedy/greedy_algorithm.assets/coin_change_greedy_vs_dp.png and b/docs/chapter_greedy/greedy_algorithm.assets/coin_change_greedy_vs_dp.png differ diff --git a/docs/chapter_greedy/greedy_algorithm.md b/docs/chapter_greedy/greedy_algorithm.md index 2cd435499..05d433d9b 100644 --- a/docs/chapter_greedy/greedy_algorithm.md +++ b/docs/chapter_greedy/greedy_algorithm.md @@ -27,7 +27,7 @@ ## 贪心算法的优点与局限性 -**贪心算法不仅操作直接、实现简单,而且通常效率也很高**。在以上代码中,记硬币最小面值为 $\min(coins)$ ,则贪心选择最多循环 $amt / \min(coins)$ 次,时间复杂度为 $O(amt / \min(coins))$ 。这比动态规划解法的时间复杂度 $O(n \times amt)$ 降低了一个数量级。 +**贪心算法不仅操作直接、实现简单,而且通常效率也很高**。在以上代码中,记硬币最小面值为 $\min(coins)$ ,则贪心选择最多循环 $amt / \min(coins)$ 次,时间复杂度为 $O(amt / \min(coins))$ 。这比动态规划解法的时间复杂度 $O(n \times amt)$ 小了一个数量级。 然而,**对于某些硬币面值组合,贪心算法并不能找到最优解**。下图给出了两个示例。 diff --git a/docs/chapter_greedy/max_capacity_problem.assets/max_capacity_greedy_step1.png b/docs/chapter_greedy/max_capacity_problem.assets/max_capacity_greedy_step1.png index 3e73587d9..9d7f8aa6b 100644 Binary files a/docs/chapter_greedy/max_capacity_problem.assets/max_capacity_greedy_step1.png and b/docs/chapter_greedy/max_capacity_problem.assets/max_capacity_greedy_step1.png differ diff --git a/docs/chapter_hashing/hash_collision.assets/hash_table_chaining.png b/docs/chapter_hashing/hash_collision.assets/hash_table_chaining.png index bc91ce226..1c67feeff 100644 Binary files a/docs/chapter_hashing/hash_collision.assets/hash_table_chaining.png and b/docs/chapter_hashing/hash_collision.assets/hash_table_chaining.png differ diff --git a/docs/chapter_hashing/hash_collision.md b/docs/chapter_hashing/hash_collision.md index d28e13878..9636d910d 100644 --- a/docs/chapter_hashing/hash_collision.md +++ b/docs/chapter_hashing/hash_collision.md @@ -56,7 +56,7 @@ 然而,**线性探测容易产生“聚集现象”**。具体来说,数组中连续被占用的位置越长,这些连续位置发生哈希冲突的可能性越大,从而进一步促使该位置的聚堆生长,形成恶性循环,最终导致增删查改操作效率劣化。 -值得注意的是,**我们不能在开放寻址哈希表中直接删除元素**。这是因为删除元素会在数组内产生一个空桶 `None` ,而当查询元素时,线性探测到该空桶就会返回,因此在该空桶之下的元素都无法再被访问到,程序可能误判这些元素不存在。 +值得注意的是,**我们不能在开放寻址哈希表中直接删除元素**。这是因为删除元素会在数组内产生一个空桶 `None` ,而当查询元素时,线性探测到该空桶就会返回,因此在该空桶之下的元素都无法再被访问到,程序可能误判这些元素不存在,如下图所示。 ![在开放寻址中删除元素导致的查询问题](hash_collision.assets/hash_table_open_addressing_deletion.png) diff --git a/docs/chapter_hashing/hash_map.assets/hash_collision.png b/docs/chapter_hashing/hash_map.assets/hash_collision.png index dd054c367..45f42fc2a 100644 Binary files a/docs/chapter_hashing/hash_map.assets/hash_collision.png and b/docs/chapter_hashing/hash_map.assets/hash_collision.png differ diff --git a/docs/chapter_hashing/hash_map.assets/hash_function.png b/docs/chapter_hashing/hash_map.assets/hash_function.png index 6997ec531..d89389c21 100644 Binary files a/docs/chapter_hashing/hash_map.assets/hash_function.png and b/docs/chapter_hashing/hash_map.assets/hash_function.png differ diff --git a/docs/chapter_hashing/hash_map.assets/hash_table_lookup.png b/docs/chapter_hashing/hash_map.assets/hash_table_lookup.png index 9c1168f7f..3df38c8b1 100644 Binary files a/docs/chapter_hashing/hash_map.assets/hash_table_lookup.png and b/docs/chapter_hashing/hash_map.assets/hash_table_lookup.png differ diff --git a/docs/chapter_hashing/hash_map.assets/hash_table_reshash.png b/docs/chapter_hashing/hash_map.assets/hash_table_reshash.png index d3cf44267..c00f1c20e 100644 Binary files a/docs/chapter_hashing/hash_map.assets/hash_table_reshash.png and b/docs/chapter_hashing/hash_map.assets/hash_table_reshash.png differ diff --git a/docs/chapter_heap/build_heap.assets/heapify_operations_count.png b/docs/chapter_heap/build_heap.assets/heapify_operations_count.png index 89f17fac3..644da4b93 100644 Binary files a/docs/chapter_heap/build_heap.assets/heapify_operations_count.png and b/docs/chapter_heap/build_heap.assets/heapify_operations_count.png differ diff --git a/docs/chapter_heap/build_heap.md b/docs/chapter_heap/build_heap.md index fa3d6845a..a2c3c505a 100644 --- a/docs/chapter_heap/build_heap.md +++ b/docs/chapter_heap/build_heap.md @@ -46,7 +46,7 @@ $$ T(h) = 2^0h + 2^1(h-1) + 2^2(h-2) + \dots + 2^{(h-1)}\times1 $$ -化简上式需要借助中学的数列知识,将对 $T(h)$ 乘以 $2$ ,得到: +化简上式需要借助中学的数列知识,先将 $T(h)$ 乘以 $2$ ,得到: $$ \begin{aligned} diff --git a/docs/chapter_heap/heap.assets/representation_of_heap.png b/docs/chapter_heap/heap.assets/representation_of_heap.png index c0a3e7bd0..366ff2695 100644 Binary files a/docs/chapter_heap/heap.assets/representation_of_heap.png and b/docs/chapter_heap/heap.assets/representation_of_heap.png differ diff --git a/docs/chapter_heap/top_k.assets/top_k_heap_step1.png b/docs/chapter_heap/top_k.assets/top_k_heap_step1.png index fd950e7ee..72ba984c7 100644 Binary files a/docs/chapter_heap/top_k.assets/top_k_heap_step1.png and b/docs/chapter_heap/top_k.assets/top_k_heap_step1.png differ diff --git a/docs/chapter_heap/top_k.assets/top_k_heap_step2.png b/docs/chapter_heap/top_k.assets/top_k_heap_step2.png index bdcda82d4..4a518c065 100644 Binary files a/docs/chapter_heap/top_k.assets/top_k_heap_step2.png and b/docs/chapter_heap/top_k.assets/top_k_heap_step2.png differ diff --git a/docs/chapter_heap/top_k.assets/top_k_heap_step3.png b/docs/chapter_heap/top_k.assets/top_k_heap_step3.png index 0e56b3626..99ee5ec5c 100644 Binary files a/docs/chapter_heap/top_k.assets/top_k_heap_step3.png and b/docs/chapter_heap/top_k.assets/top_k_heap_step3.png differ diff --git a/docs/chapter_heap/top_k.assets/top_k_heap_step4.png b/docs/chapter_heap/top_k.assets/top_k_heap_step4.png index d67d99481..b70e2177b 100644 Binary files a/docs/chapter_heap/top_k.assets/top_k_heap_step4.png and b/docs/chapter_heap/top_k.assets/top_k_heap_step4.png differ diff --git a/docs/chapter_heap/top_k.assets/top_k_heap_step5.png b/docs/chapter_heap/top_k.assets/top_k_heap_step5.png index 501cb8b1f..09620a8d5 100644 Binary files a/docs/chapter_heap/top_k.assets/top_k_heap_step5.png and b/docs/chapter_heap/top_k.assets/top_k_heap_step5.png differ diff --git a/docs/chapter_heap/top_k.assets/top_k_heap_step6.png b/docs/chapter_heap/top_k.assets/top_k_heap_step6.png index 54badac18..44180cfd2 100644 Binary files a/docs/chapter_heap/top_k.assets/top_k_heap_step6.png and b/docs/chapter_heap/top_k.assets/top_k_heap_step6.png differ diff --git a/docs/chapter_heap/top_k.assets/top_k_heap_step7.png b/docs/chapter_heap/top_k.assets/top_k_heap_step7.png index 6e72bec2b..32c07b636 100644 Binary files a/docs/chapter_heap/top_k.assets/top_k_heap_step7.png and b/docs/chapter_heap/top_k.assets/top_k_heap_step7.png differ diff --git a/docs/chapter_heap/top_k.assets/top_k_heap_step8.png b/docs/chapter_heap/top_k.assets/top_k_heap_step8.png index f4b192fb8..4510d5812 100644 Binary files a/docs/chapter_heap/top_k.assets/top_k_heap_step8.png and b/docs/chapter_heap/top_k.assets/top_k_heap_step8.png differ diff --git a/docs/chapter_heap/top_k.assets/top_k_sorting.png b/docs/chapter_heap/top_k.assets/top_k_sorting.png index c24842a68..3f6514c57 100644 Binary files a/docs/chapter_heap/top_k.assets/top_k_sorting.png and b/docs/chapter_heap/top_k.assets/top_k_sorting.png differ diff --git a/docs/chapter_heap/top_k.assets/top_k_traversal.png b/docs/chapter_heap/top_k.assets/top_k_traversal.png index ddf411669..988e26121 100644 Binary files a/docs/chapter_heap/top_k.assets/top_k_traversal.png and b/docs/chapter_heap/top_k.assets/top_k_traversal.png differ diff --git a/docs/chapter_introduction/algorithms_are_everywhere.assets/binary_search_dictionary_step1.png b/docs/chapter_introduction/algorithms_are_everywhere.assets/binary_search_dictionary_step1.png index 7d87ddf24..83b560f9a 100644 Binary files a/docs/chapter_introduction/algorithms_are_everywhere.assets/binary_search_dictionary_step1.png and b/docs/chapter_introduction/algorithms_are_everywhere.assets/binary_search_dictionary_step1.png differ diff --git a/docs/chapter_preface/suggestions.assets/code_md_to_repo.png b/docs/chapter_preface/suggestions.assets/code_md_to_repo.png index 26c357c2f..360f2eea9 100644 Binary files a/docs/chapter_preface/suggestions.assets/code_md_to_repo.png and b/docs/chapter_preface/suggestions.assets/code_md_to_repo.png differ diff --git a/docs/chapter_preface/suggestions.assets/learning_route.png b/docs/chapter_preface/suggestions.assets/learning_route.png index 83f932668..d7986b433 100644 Binary files a/docs/chapter_preface/suggestions.assets/learning_route.png and b/docs/chapter_preface/suggestions.assets/learning_route.png differ diff --git a/docs/chapter_searching/binary_search.assets/binary_search_step1.png b/docs/chapter_searching/binary_search.assets/binary_search_step1.png index 94bc606e8..2b3d7af3c 100644 Binary files a/docs/chapter_searching/binary_search.assets/binary_search_step1.png and b/docs/chapter_searching/binary_search.assets/binary_search_step1.png differ diff --git a/docs/chapter_searching/replace_linear_by_hashing.assets/two_sum_brute_force.png b/docs/chapter_searching/replace_linear_by_hashing.assets/two_sum_brute_force.png index c02041051..33fca976a 100644 Binary files a/docs/chapter_searching/replace_linear_by_hashing.assets/two_sum_brute_force.png and b/docs/chapter_searching/replace_linear_by_hashing.assets/two_sum_brute_force.png differ diff --git a/docs/chapter_searching/searching_algorithm_revisited.assets/searching_algorithms.png b/docs/chapter_searching/searching_algorithm_revisited.assets/searching_algorithms.png index 4d8927801..fff1066ff 100644 Binary files a/docs/chapter_searching/searching_algorithm_revisited.assets/searching_algorithms.png and b/docs/chapter_searching/searching_algorithm_revisited.assets/searching_algorithms.png differ diff --git a/docs/chapter_sorting/radix_sort.assets/radix_sort_overview.png b/docs/chapter_sorting/radix_sort.assets/radix_sort_overview.png index b3ef27df4..e123cb73b 100644 Binary files a/docs/chapter_sorting/radix_sort.assets/radix_sort_overview.png and b/docs/chapter_sorting/radix_sort.assets/radix_sort_overview.png differ diff --git a/docs/chapter_stack_and_queue/deque.assets/array_deque.png b/docs/chapter_stack_and_queue/deque.assets/array_deque.png index 5f0bcd353..ffbf7a0a8 100644 Binary files a/docs/chapter_stack_and_queue/deque.assets/array_deque.png and b/docs/chapter_stack_and_queue/deque.assets/array_deque.png differ diff --git a/docs/chapter_stack_and_queue/deque.assets/array_deque_pop_first.png b/docs/chapter_stack_and_queue/deque.assets/array_deque_pop_first.png index 9d203a63f..2d53a52b9 100644 Binary files a/docs/chapter_stack_and_queue/deque.assets/array_deque_pop_first.png and b/docs/chapter_stack_and_queue/deque.assets/array_deque_pop_first.png differ diff --git a/docs/chapter_stack_and_queue/deque.assets/array_deque_pop_last.png b/docs/chapter_stack_and_queue/deque.assets/array_deque_pop_last.png index 2c18b17aa..21eb9c453 100644 Binary files a/docs/chapter_stack_and_queue/deque.assets/array_deque_pop_last.png and b/docs/chapter_stack_and_queue/deque.assets/array_deque_pop_last.png differ diff --git a/docs/chapter_stack_and_queue/deque.assets/array_deque_push_first.png b/docs/chapter_stack_and_queue/deque.assets/array_deque_push_first.png index 8b7b352e0..8a32f23d0 100644 Binary files a/docs/chapter_stack_and_queue/deque.assets/array_deque_push_first.png and b/docs/chapter_stack_and_queue/deque.assets/array_deque_push_first.png differ diff --git a/docs/chapter_stack_and_queue/deque.assets/array_deque_push_last.png b/docs/chapter_stack_and_queue/deque.assets/array_deque_push_last.png index 6b3baf39d..da4282357 100644 Binary files a/docs/chapter_stack_and_queue/deque.assets/array_deque_push_last.png and b/docs/chapter_stack_and_queue/deque.assets/array_deque_push_last.png differ diff --git a/docs/chapter_stack_and_queue/deque.assets/deque_operations.png b/docs/chapter_stack_and_queue/deque.assets/deque_operations.png index a39788322..6fa08af9d 100644 Binary files a/docs/chapter_stack_and_queue/deque.assets/deque_operations.png and b/docs/chapter_stack_and_queue/deque.assets/deque_operations.png differ diff --git a/docs/chapter_stack_and_queue/deque.assets/linkedlist_deque_pop_first.png b/docs/chapter_stack_and_queue/deque.assets/linkedlist_deque_pop_first.png index b50944ef1..7a4d41698 100644 Binary files a/docs/chapter_stack_and_queue/deque.assets/linkedlist_deque_pop_first.png and b/docs/chapter_stack_and_queue/deque.assets/linkedlist_deque_pop_first.png differ diff --git a/docs/chapter_stack_and_queue/deque.assets/linkedlist_deque_pop_last.png b/docs/chapter_stack_and_queue/deque.assets/linkedlist_deque_pop_last.png index 8df343375..67c0a20e8 100644 Binary files a/docs/chapter_stack_and_queue/deque.assets/linkedlist_deque_pop_last.png and b/docs/chapter_stack_and_queue/deque.assets/linkedlist_deque_pop_last.png differ diff --git a/docs/chapter_stack_and_queue/deque.assets/linkedlist_deque_push_first.png b/docs/chapter_stack_and_queue/deque.assets/linkedlist_deque_push_first.png index 2cdd94a5a..204e1808c 100644 Binary files a/docs/chapter_stack_and_queue/deque.assets/linkedlist_deque_push_first.png and b/docs/chapter_stack_and_queue/deque.assets/linkedlist_deque_push_first.png differ diff --git a/docs/chapter_stack_and_queue/deque.assets/linkedlist_deque_push_last.png b/docs/chapter_stack_and_queue/deque.assets/linkedlist_deque_push_last.png index eed3f18ea..779f3eb07 100644 Binary files a/docs/chapter_stack_and_queue/deque.assets/linkedlist_deque_push_last.png and b/docs/chapter_stack_and_queue/deque.assets/linkedlist_deque_push_last.png differ diff --git a/docs/chapter_stack_and_queue/deque.md b/docs/chapter_stack_and_queue/deque.md index 93c1155b6..37e72b3c0 100644 --- a/docs/chapter_stack_and_queue/deque.md +++ b/docs/chapter_stack_and_queue/deque.md @@ -10,14 +10,14 @@
表