KMP算法的总结

(1).KMP的作用      用于字符串匹配,用于查找一个字符串是否是另一个字符串的子串,可以返回出现的次数以及出现的位置。 (2).KMP的模板 #include <stdio.h> #include <string.h> #include <stdlib.h> using namespace std; char s1[110]; char s2[110]; int Next[110]; vo
相关文章
相关标签/搜索