摘要: 问题定义:给定字符串string: abcdeabcea 以及匹配字符串parttern: abce 问 parttern是否为string的子串,如果是请返回第一次出现索引的位置,否则返回-1 以下是暴力匹配的代码: class Solution: def match(self, string,p 阅读全文
posted @ 2020-09-01 21:54 扁鹊小脑 阅读(182) 评论(0) 推荐(0) 编辑