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.
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.