算法-KMP

串 定義:線性存儲的一組數據(默認是字符) 串的匹配 給定一段文本string,給定一個模式pattern,求pattern在string中的位置。 令string 長度爲n,pattern長度爲m #include <string.h> char string[]="aaabbbccc",pattern[],*p="bbb"; p = strstr(string,pattern); //T=O(
相關文章
相關標籤/搜索