leetcode 127 最长公共子串:给定两个字符串str1和str2,输出两个字符串的最长公共子串 题目保证str1和str2的最长公共子串存在且唯一。 python
leetcode 最长公共子串 python给定两个字符串str1和str2,输出两个字符串的最长公共子串 题目保证str1和str2的最长公共子串存在且唯一。class Solution:def LCS(self , str1 , str2 ):# write code heres1,s2='',''for i in str1:s1=s1+iif s1 in str2:
·
已为社区贡献4条内容
所有评论(0)