LeetCode#28 Implement strStr()

Problem Definition:

Implement strStr().

Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.

Solution: 字符串匹配问题。brute force、KMP 、Rabin-Karp, KMP, and the Boyer- Moore algorithm.

 

posted @ 2015-07-24 20:13  曾可爱  阅读(97)  评论(0编辑  收藏  举报