Implement strStr()

Implement strStr().java Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.算法 用的KMP算法,時間複雜度O(n+m),創建Next數組的時間複雜度須要仔細觀察才能計算出來,參考《算法導論》數組 KMP算法細提及來比
相關文章
相關標籤/搜索