fix some typos (#1540)

This commit is contained in:
Flamingo
2024-10-31 21:26:28 +08:00
committed by GitHub
parent b3b10f2300
commit 57cf6b1ea6
6 changed files with 24 additions and 24 deletions

View File

@ -88,17 +88,17 @@ if __name__ == "__main__":
# 暴力搜索
res = min_path_sum_dfs(grid, n - 1, m - 1)
print(f"从左上角到右下角的小路径和为 {res}")
print(f"从左上角到右下角的小路径和为 {res}")
# 记忆化搜索
mem = [[-1] * m for _ in range(n)]
res = min_path_sum_dfs_mem(grid, mem, n - 1, m - 1)
print(f"从左上角到右下角的小路径和为 {res}")
print(f"从左上角到右下角的小路径和为 {res}")
# 动态规划
res = min_path_sum_dp(grid)
print(f"从左上角到右下角的小路径和为 {res}")
print(f"从左上角到右下角的小路径和为 {res}")
# 空间优化后的动态规划
res = min_path_sum_dp_comp(grid)
print(f"从左上角到右下角的小路径和为 {res}")
print(f"从左上角到右下角的小路径和为 {res}")