python實現最長公共子串

python實現最長公共子串 import numpy as np def longest_substring(str1,str2): # 首先建立一個長寬分別爲len(str1),len(str2)的二維數組 record = np.zeros(shape=(len(str1),len(str2))) # 獲取第一個字符串的長度 str1_length = le
相關文章
相關標籤/搜索