Merge pull request #2795 from markwang1992/1143-longestCommonSubsequence

1143.最长公共子序列文字勘误
This commit is contained in:
程序员Carl
2024-11-25 09:16:48 +08:00
committed by GitHub

View File

@ -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。