数据结构——KMP算法C++版

#include "stdafx.h" #include <iostream> using namespace std; void get_next(char*t, int next[ ]){ int t_len=strlen(t); int i=0; //求解每一个next[i] next[0]=-1; //递推基本条件,而后求解next[i+1] int j=-1;
相关文章
相关标签/搜索