【Leetcode】30. Substring with Concatenation of All Words 串聯所有單詞的子串

解法 關鍵在於所有的單詞長度都相同 最簡單的方法就是依次判斷每個下標i符不符合條件 class Solution(object): def findSubstring(self, s, words): """ :type s: str :type words: List[str] :rtype: List[int] """ if len(words)==0:
相關文章
相關標籤/搜索