会员
周边
捐助
新闻
博问
闪存
赞助商
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
扁鹊小脑
博客园
首页
新随笔
联系
管理
订阅
2020年9月1日
KMP算法
摘要: 问题定义:给定字符串string: abcdeabcea 以及匹配字符串parttern: abce 问 parttern是否为string的子串,如果是请返回第一次出现索引的位置,否则返回-1 以下是暴力匹配的代码: class Solution: def match(self, string,p
阅读全文
posted @ 2020-09-01 21:54 扁鹊小脑
阅读(182)
评论(0)
推荐(0)
编辑
公告