今際の国の呵呵君
Sunday, September 24, 2017
[LeetCode]Implement strStr()
可以用Rolling Hash解,但是要考虑conflicts的情况。KMP的解法请参考这篇
文章
。代码如下:
优化KMP如下:
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment