实际上是最长连续公共子串 class Solution: def LCS(self , str1 , str2 ): n, m = len(str1), len(str2) dp = [[0] * (m+1) for _ in range(n+1)] p = (0,0) for i in range(1,n+1): for j in range(1,m+1): tmp = int(str1[i-1] == str2[j-1]) dp[i...