Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 4df16b4

Browse files
author
ironartisan
committed
添加0279.完全平方数java版本二解法
1 parent aa4ce0f commit 4df16b4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎problems/0279.完全平方数.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ class Solution:
226226
return dp[n]
227227

228228
def numSquares1(self, n: int) -> int:
229-
'''版本二'''
229+
'''版本二, 先遍历物品, 再遍历背包'''
230230
# 初始化
231231
nums = [i**2 for i in range(1, n + 1) if i**2 <= n]
232232
dp = [10**4]*(n + 1)

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /