diff --git a/problems/0279.完全平方数.md b/problems/0279.完全平方数.md index f23453da..3c0f0414 100644 --- a/problems/0279.完全平方数.md +++ b/problems/0279.完全平方数.md @@ -226,7 +226,7 @@ class Solution: return dp[n] def numSquares1(self, n: int) -> int: - '''版本二''' + '''版本二, 先遍历物品, 再遍历背包''' # 初始化 nums = [i**2 for i in range(1, n + 1) if i**2 <= n] dp = [10**4]*(n + 1)