文件名称:kmp
介绍说明--下载内容均来自于网络,请自行研究使用
串的模式匹配可以从模式p的p[k]开始与正文t的t[j+i]开始依次比较,(若p[k]==t[j+i]继续比较p[k+1]=?=t[j+i+1]直至出现p[k+l]!=t[j+i+l-1]时,重新寻找新的p[k+l]的那个最大k 然后再比较p[k ]=?=t[j+i+l]直至匹配或遍历结束)。省去了前面的k次比较。当对应p[i]的k有多个,取最大的k。-Pattern matching string from the pattern p, p [k] started with the body of t, t [j+ i] began to turn more, (if p [k] == t [j+ i] continues to compare p [k+1] =? = t [j+ i+1] until the emergence of p [k+ l]! = t [j+ i+ l-1], to re-search for new p [k+ l] in that the largest k ' and then Comparison of p [k' ]=?= t [j+ i+ l] until the end of the match or traversal). Eliminating the need for the previous k comparisons. When the corresponding p [i] k-there are several, take the largest k.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
串的模式匹配.doc