摘要: class Solution(object): def strStr(self, haystack, needle): """ :type haystack: str :type needle: str :rtype: int """ return haystack.find(needle) ... 阅读全文
posted @ 2019-03-22 06:20 周洋 阅读(154) 评论(0) 推荐(0) 编辑
摘要: class Solution(object): def repeatedSubstringPattern(self, s): return True if re.match(r'(\w+)\1+$', s) else False 阅读全文
posted @ 2019-03-22 01:29 周洋 阅读(168) 评论(0) 推荐(0) 编辑