标签:字符串 提交 color lis style def break bst 就是
class Solution: def findSubstring(self, s: str, words): if s==‘‘ or words==[]:return [] n=len(words) m=len(words[0]) r=[] i=0 while i<len(s)-m*n+1: for j in words: p=s[i:i+m*n] t=list(p[m*i:m*(i+1)] for i in range(n)) if t.count(j)!=words.count(j): i+=1 break else: r.append(i) i+=1 return r
标签:字符串 提交 color lis style def break bst 就是
原文地址:https://www.cnblogs.com/taoyuxin/p/11699441.html