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 850391c

Browse files
Merge pull request #149 from wangxinalex/patch-3
Update 01.Linear-DP-01.md
2 parents 381b4c8 + e6237f7 commit 850391c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎Contents/10.Dynamic-Programming/03.Linear-DP/01.Linear-DP-01.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383

8484
- 如果 $nums[j] < nums[i],ドル则 $nums[i]$ 可以接在 $nums[j]$ 后面,此时以 $nums[i]$ 结尾的最长递增子序列长度会在「以 $nums[j]$ 结尾的最长递增子序列长度」的基础上加 1ドル,ドル即:$dp[i] = dp[j] + 1$。
8585

86-
- 如果 $nums[j] \le nums[i],ドル则 $nums[i]$ 不可以接在 $nums[j]$ 后面,可以直接跳过。
86+
- 如果 $nums[j] \ge nums[i],ドル则 $nums[i]$ 不可以接在 $nums[j]$ 后面,可以直接跳过。
8787

8888
综上,我们的状态转移方程为:$dp[i] = max(dp[i], dp[j] + 1), 0 \le j < i, nums[j] < nums[i]$。
8989

0 commit comments

Comments
(0)

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