mirror of
https://github.com/youngyangyang04/leetcode-master.git
synced 2025-07-06 07:06:42 +08:00
Merge pull request #2795 from markwang1992/1143-longestCommonSubsequence
1143.最长公共子序列文字勘误
This commit is contained in:
@ -80,7 +80,7 @@ if (text1[i - 1] == text2[j - 1]) {
|
||||
|
||||
先看看dp[i][0]应该是多少呢?
|
||||
|
||||
test1[0, i-1]和空串的最长公共子序列自然是0,所以dp[i][0] = 0;
|
||||
text1[0, i-1]和空串的最长公共子序列自然是0,所以dp[i][0] = 0;
|
||||
|
||||
同理dp[0][j]也是0。
|
||||
|
||||
|
Reference in New Issue
Block a user