diff --git a/chapter_array_and_linkedlist/linked_list.assets/linkedlist_insert_node.png b/chapter_array_and_linkedlist/linked_list.assets/linkedlist_insert_node.png index 1f6d24dce..64672d41e 100644 Binary files a/chapter_array_and_linkedlist/linked_list.assets/linkedlist_insert_node.png and b/chapter_array_and_linkedlist/linked_list.assets/linkedlist_insert_node.png differ diff --git a/chapter_array_and_linkedlist/linked_list.assets/linkedlist_remove_node.png b/chapter_array_and_linkedlist/linked_list.assets/linkedlist_remove_node.png index 670db4a3f..68c72b97f 100644 Binary files a/chapter_array_and_linkedlist/linked_list.assets/linkedlist_remove_node.png and b/chapter_array_and_linkedlist/linked_list.assets/linkedlist_remove_node.png differ diff --git a/chapter_computational_complexity/space_complexity.assets/space_complexity_common_types.png b/chapter_computational_complexity/space_complexity.assets/space_complexity_common_types.png index 1f0d8daee..217dc6f03 100644 Binary files a/chapter_computational_complexity/space_complexity.assets/space_complexity_common_types.png and b/chapter_computational_complexity/space_complexity.assets/space_complexity_common_types.png differ diff --git a/chapter_computational_complexity/space_complexity.assets/space_complexity_exponential.png b/chapter_computational_complexity/space_complexity.assets/space_complexity_exponential.png index 560571067..98730370d 100644 Binary files a/chapter_computational_complexity/space_complexity.assets/space_complexity_exponential.png and b/chapter_computational_complexity/space_complexity.assets/space_complexity_exponential.png differ diff --git a/chapter_computational_complexity/space_complexity.assets/space_complexity_recursive_quadratic.png b/chapter_computational_complexity/space_complexity.assets/space_complexity_recursive_quadratic.png index 25d4dcc3d..da696e960 100644 Binary files a/chapter_computational_complexity/space_complexity.assets/space_complexity_recursive_quadratic.png and b/chapter_computational_complexity/space_complexity.assets/space_complexity_recursive_quadratic.png differ diff --git a/chapter_computational_complexity/time_complexity.assets/asymptotic_upper_bound.png b/chapter_computational_complexity/time_complexity.assets/asymptotic_upper_bound.png index 8c69831ca..d0dddbb05 100644 Binary files a/chapter_computational_complexity/time_complexity.assets/asymptotic_upper_bound.png and b/chapter_computational_complexity/time_complexity.assets/asymptotic_upper_bound.png differ diff --git a/chapter_computational_complexity/time_complexity.assets/time_complexity_common_types.png b/chapter_computational_complexity/time_complexity.assets/time_complexity_common_types.png index 500e1a7e0..c1ab027e0 100644 Binary files a/chapter_computational_complexity/time_complexity.assets/time_complexity_common_types.png and b/chapter_computational_complexity/time_complexity.assets/time_complexity_common_types.png differ diff --git a/chapter_computational_complexity/time_complexity.assets/time_complexity_constant_linear_quadratic.png b/chapter_computational_complexity/time_complexity.assets/time_complexity_constant_linear_quadratic.png index d9f943f14..99758187f 100644 Binary files a/chapter_computational_complexity/time_complexity.assets/time_complexity_constant_linear_quadratic.png and b/chapter_computational_complexity/time_complexity.assets/time_complexity_constant_linear_quadratic.png differ diff --git a/chapter_computational_complexity/time_complexity.assets/time_complexity_exponential.png b/chapter_computational_complexity/time_complexity.assets/time_complexity_exponential.png index 69e34bab3..bf9ef1b37 100644 Binary files a/chapter_computational_complexity/time_complexity.assets/time_complexity_exponential.png and b/chapter_computational_complexity/time_complexity.assets/time_complexity_exponential.png differ diff --git a/chapter_computational_complexity/time_complexity.assets/time_complexity_factorial.png b/chapter_computational_complexity/time_complexity.assets/time_complexity_factorial.png index 50ce0a85b..52bf0c1c2 100644 Binary files a/chapter_computational_complexity/time_complexity.assets/time_complexity_factorial.png and b/chapter_computational_complexity/time_complexity.assets/time_complexity_factorial.png differ diff --git a/chapter_computational_complexity/time_complexity.assets/time_complexity_logarithmic.png b/chapter_computational_complexity/time_complexity.assets/time_complexity_logarithmic.png index 48fa8c163..739c386f4 100644 Binary files a/chapter_computational_complexity/time_complexity.assets/time_complexity_logarithmic.png and b/chapter_computational_complexity/time_complexity.assets/time_complexity_logarithmic.png differ diff --git a/chapter_computational_complexity/time_complexity.assets/time_complexity_logarithmic_linear.png b/chapter_computational_complexity/time_complexity.assets/time_complexity_logarithmic_linear.png index 20daacbbc..3ae59496c 100644 Binary files a/chapter_computational_complexity/time_complexity.assets/time_complexity_logarithmic_linear.png and b/chapter_computational_complexity/time_complexity.assets/time_complexity_logarithmic_linear.png differ diff --git a/chapter_data_structure/number_encoding.assets/1s_2s_complement.png b/chapter_data_structure/number_encoding.assets/1s_2s_complement.png index bc1725be0..369b894ce 100644 Binary files a/chapter_data_structure/number_encoding.assets/1s_2s_complement.png and b/chapter_data_structure/number_encoding.assets/1s_2s_complement.png differ diff --git a/chapter_data_structure/number_encoding.assets/ieee_754_float.png b/chapter_data_structure/number_encoding.assets/ieee_754_float.png index 55f1b89f9..b0acc827e 100644 Binary files a/chapter_data_structure/number_encoding.assets/ieee_754_float.png and b/chapter_data_structure/number_encoding.assets/ieee_754_float.png differ diff --git a/chapter_divide_and_conquer/build_binary_tree_problem/index.html b/chapter_divide_and_conquer/build_binary_tree_problem/index.html index b5eb6d6f6..fe72b1d17 100644 --- a/chapter_divide_and_conquer/build_binary_tree_problem/index.html +++ b/chapter_divide_and_conquer/build_binary_tree_problem/index.html @@ -3553,7 +3553,7 @@

12.3   构建二叉树问题

Question

-

给定一棵二叉树的前序遍历 preorder 和中序遍历 inorder ,请从中构建二叉树,返回二叉树的根节点。假设二叉树中没有值重复的节点。

+

给定一棵二叉树的前序遍历 preorder 和中序遍历 inorder ,请从中构建二叉树,返回二叉树的根节点。假设二叉树中没有值重复的节点,如图 12-5 所示。

构建二叉树的示例数据

图 12-5   构建二叉树的示例数据

diff --git a/chapter_dynamic_programming/edit_distance_problem.assets/edit_distance_decision_tree.png b/chapter_dynamic_programming/edit_distance_problem.assets/edit_distance_decision_tree.png index 6459d64d2..5b67c8ace 100644 Binary files a/chapter_dynamic_programming/edit_distance_problem.assets/edit_distance_decision_tree.png and b/chapter_dynamic_programming/edit_distance_problem.assets/edit_distance_decision_tree.png differ diff --git a/chapter_dynamic_programming/intro_to_dynamic_programming.assets/climbing_stairs_state_transfer.png b/chapter_dynamic_programming/intro_to_dynamic_programming.assets/climbing_stairs_state_transfer.png index bd2166a24..6b28c0930 100644 Binary files a/chapter_dynamic_programming/intro_to_dynamic_programming.assets/climbing_stairs_state_transfer.png and b/chapter_dynamic_programming/intro_to_dynamic_programming.assets/climbing_stairs_state_transfer.png differ diff --git a/chapter_dynamic_programming/summary/index.html b/chapter_dynamic_programming/summary/index.html index 31730fb53..5299aff7e 100644 --- a/chapter_dynamic_programming/summary/index.html +++ b/chapter_dynamic_programming/summary/index.html @@ -3456,7 +3456,7 @@
  • 0-1 背包的状态定义为前 \(i\) 个物品在剩余容量为 \(c\) 的背包中的最大价值。根据不放入背包和放入背包两种决策,可得到最优子结构,并构建出状态转移方程。在空间优化中,由于每个状态依赖正上方和左上方的状态,因此需要倒序遍历列表,避免左上方状态被覆盖。
  • 完全背包问题的每种物品的选取数量无限制,因此选择放入物品的状态转移与 0-1 背包问题不同。由于状态依赖正上方和正左方的状态,因此在空间优化中应当正序遍历。
  • 零钱兑换问题是完全背包问题的一个变种。它从求“最大”价值变为求“最小”硬币数量,因此状态转移方程中的 \(\max()\) 应改为 \(\min()\) 。从追求“不超过”背包容量到追求“恰好”凑出目标金额,因此使用 \(amt + 1\) 来表示“无法凑出目标金额”的无效解。
  • -
  • 零钱兑换 II 问题从求“最少硬币数量”改为求“硬币组合数量”,状态转移方程相应地从 \(\min()\) 改为求和运算符。
  • +
  • 零钱兑换问题 II 从求“最少硬币数量”改为求“硬币组合数量”,状态转移方程相应地从 \(\min()\) 改为求和运算符。
  • 编辑距离问题