文件名称:KMP008
介绍说明--下载内容来自于网络,使用问题请自行百度
串的模式匹配的朴素算法是O(N^2)的, 可以
利用KMP(由D.E.Knuth, J.H.Morris, V.R.Pratt提出)算法改进至线性的算法. KMP算法与朴素算法的不同在于:处理"失配"情况. 不同于将指针完全回溯, KMP算法先根据已经部分匹配的信息, 将匹配的指针跳过不必匹配的位置.-Series of simple pattern matching algorithm is O (N ^ 2), and can make use of KMP (from DEKnuth, JHMorris, VRPratt made) algorithm to improve the algorithm to linear. KMP algorithm and simple algorithm is different: the " mismatch" situation. pointer completely different to back, KMP algorithm first part of the basis of information match, the pointer will skip the match do not have to match the position.
利用KMP(由D.E.Knuth, J.H.Morris, V.R.Pratt提出)算法改进至线性的算法. KMP算法与朴素算法的不同在于:处理"失配"情况. 不同于将指针完全回溯, KMP算法先根据已经部分匹配的信息, 将匹配的指针跳过不必匹配的位置.-Series of simple pattern matching algorithm is O (N ^ 2), and can make use of KMP (from DEKnuth, JHMorris, VRPratt made) algorithm to improve the algorithm to linear. KMP algorithm and simple algorithm is different: the " mismatch" situation. pointer completely different to back, KMP algorithm first part of the basis of information match, the pointer will skip the match do not have to match the position.
相关搜索: kmp java simple
kmp java
(系统自动生成,下载前可以参看下载内容)
下载文件列表
KMP008.txt
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.