H****r 发帖数: 2801 | 1 KMP 通过
BoyerMoore 通过small,卡large... 手工测试发现除最后一个test外都可以,最后一个
test太长在网站上看不到.... 自己测试的一些都可以啊。 leetcode 能告诉最后一个
test 具体是啥吗? |
l*********8 发帖数: 4642 | 2 aaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaab |
H****r 发帖数: 2801 | 3 worst-case running time of O(n+m) only if the pattern does not appear in the
text. 怎么超时了尼?
【在 l*********8 的大作中提到】 : aaaaaaaaaaaaaaaaaaaaaa : aaaaaaaaaaaaaaaaaaaaab
|
l*********8 发帖数: 4642 | 4 把a的个数增加到几百个试试
the
【在 H****r 的大作中提到】 : worst-case running time of O(n+m) only if the pattern does not appear in the : text. 怎么超时了尼?
|
H****r 发帖数: 2801 | 5 还是自己程序有点问题,现在改了可以通过了 :)
谢 长路08!
【在 l*********8 的大作中提到】 : aaaaaaaaaaaaaaaaaaaaaa : aaaaaaaaaaaaaaaaaaaaab
|