數據結構——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;
相關文章
相關標籤/搜索