KMP算法 源代码

汇集 KMP算法 相关的电路原理图、PCB工程文件、单片机/FPGA源代码、数据手册与应用设计方案。

收录资源 500 份 全站深度检索
源码文件

模式匹配的KMP算法详解 这种由D.E.Knuth,J.H.Morris和V.R.Pratt同时发现的改进的模式匹配算法简称为KMP算法。大概学过信息学的都知道,是个比较难理解的算法,今天特把它搞个彻彻底底明明白白。 注意到这是一个改进的算法,所以…

源码文件

#include #include //失效函数 int *f(char *strshort) { int length=strlen(strshort); int *array=new int[length]; array[0]=-1; …

源码文件

void getnext(char t[],int next[]) { //求模式t的next值并存入next数组中 int i,j; i=1,j=0; next[1]=0; while(i

源码文件

#ifndef_CMyString_ #define _CMyString_ #define MAX_STRING_SIZE 1024 class CMyString { private: int length; ch…

源码文件

void getnext(char t[],int next[]) { //求模式t的next值并存入next数组中 int i,j; i=1,j=0; next[1]=0; while(i

源码文件

#include #include using namespace std; class CheckString { char key; public: char s[20]; int len; int viewhead; i…

源码文件

int Index_KMP(string S,string T,int pos) { //利用模式串T的next函数求T在主串S中第pos个字符之后的位置 //KMP算法.其中,T非空,1