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 cb9da4f

Browse files
Update 0416.分割等和子集.md
1 parent 212e8f8 commit cb9da4f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎problems/0416.分割等和子集.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ class Solution:
351351
# 当前数字小于等于目标和时,可以选择使用或不使用该数字
352352
# dp[i][j] = dp[i - 1][j] or dp[i - 1][j - nums[i - 1]]
353353

354-
# 当前数字小于等于目标和时,可以选择使用或不使用该数字的最大值
354+
# 当前数字小于等于目标和时,选择使用或不使用该数字的最大值
355355
dp[i][j] = max(dp[i - 1][j], dp[i - 1][j - nums[i - 1]])
356356

357357
return dp[len(nums)][target_sum]

0 commit comments

Comments
(0)

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