登录
首页 » 数据结构 » 由于简单模式匹配算法在一次字符比较失败后,简单的把模式串位置向前移动一个字符位置,这样就丢掉了前面字符匹配中得到的信息,效率差。所以就需要一种无回溯的算法来提高...

由于简单模式匹配算法在一次字符比较失败后,简单的把模式串位置向前移动一个字符位置,这样就丢掉了前面字符匹配中得到的信息,效率差。所以就需要一种无回溯的算法来提高...

于 2022-03-19 发布 文件大小:3.18 kB
0 242
下载积分: 2 下载次数: 1

代码说明:

由于简单模式匹配算法在一次字符比较失败后,简单的把模式串位置向前移动一个字符位置,这样就丢掉了前面字符匹配中得到的信息,效率差。所以就需要一种无回溯的算法来提高效率,这里使用KMP(Knuth-Morris-Pratt)算法。模式串前面的连续片断部分称“前缀模式”,前缀模式在模式串后部重复出现的情况可以用来避免重复进行已经做过的检查,这是KMP算法中的一个重要概念。-as simple pattern-matching algorithm to compare a character failure, a simple model put forward position Series mobile location of a character, would be lost in front of characters matching the information inefficiently. There is a need for a non-backtracking algorithms to improve efficiency, the use of KMP here (Knuth-Morris-Pratt) algorithm. Model Series in front of a row clips part said "prefix model," prefix string pattern in the pattern of recurring back can be used to avoid duplication of inspection has been done, KMP algorithm is an important concept.

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 工程指令EO管理系统是飞机维修管理系统中的一个子系统,主要的功能是接收上级部门下达的EO,制作指令执行方案,确定该EO涉及的维修飞机。然后,由生产部门反馈具体的...
    工程指令EO管理系统是飞机维修管理系统中的一个子系统,主要的功能是接收上级部门下达的EO,制作指令执行方案,确定该EO涉及的维修飞机。然后,由生产部门反馈具体的维修完成时间。-works orders EO management system is the aircraft maintenance management system of a subsystem, the main function is to receive the higher authorities issued the EO, production orders implementation of the program to ensure that the EO involved in aircraft maintenance. Then, the feedback from the production sector specific timeframe for completing the repairs.
    2022-06-19 01:50:44下载
    积分:1
  • SQL连接Java
    应用背景此代码可用于制作与使用Java SQL数据库连接!你只需要替换数据库中的地址信息,用户名和通。关键技术此代码可用于建立数据库连接使用Java和SQL服务器中的应用。它不仅显示了如何连接到数据库,而且还可以如何进行查询和管理数据库连接。
    2022-07-07 18:08:01下载
    积分:1
  • Delphi编程练习:在数据库中以文件流形式保存JPEG图片。
    Delphi编程练习:在数据库中以文件流形式保存JPEG图片。-Delphi Programming practice: in the database in order to document the form of preservation of JPEG image stream.
    2022-03-07 10:05:51下载
    积分:1
  • basic data structure class definition and realization : MyStack, MyPoint, MyArc,...
    基本数据结构类的定义和实现: MyStack ,MyPoint,MyArc,Graph,MyQueuesMyStack为构造的一个通用的C++模版堆栈类 MyPoint为一个坐标结构MyArc为带权的边类Graph为临街矩阵表示的图MyQueues为按权值顺序存储的边的队列-basic data structure class definition and realization : MyStack, MyPoint, MyArc, Graph, MyQueuesMyStack for a generic structure of the C category MyPoint stack template for a structure MyArc to coordinate with the right side of the street like Graph Matrix plans MyQueues value of the order by the right side of the storage Queue
    2023-08-10 15:55:02下载
    积分:1
  • 是用回朔法实现跳马程序。数据结构入门的好例子
    是用回朔法实现跳马程序。数据结构入门的好例子-is back Schomburg Method vault procedures. Structure data entry a good example
    2023-09-02 00:20:03下载
    积分:1
  • 利用栈来完成数据结构实习的魔王语言.完成基本内容.
    利用栈来完成数据结构实习的魔王语言.完成基本内容.-use to complete stack data structure attachment fiendish language. Completion of the basic content.
    2022-02-12 20:24:25下载
    积分:1
  • 数据库课程设计工程项目管理系统 仅供参考
    数据库课程设计工程项目管理系统 仅供参考-curriculum design database management system project is for reference only
    2022-08-17 15:42:03下载
    积分:1
  • data structure used to achieve basic algorithm to achieve C bus services managem...
    用数据结构实现基本算法 用C++实现车务管理,需用到栈基本数据结构-data structure used to achieve basic algorithm to achieve C bus services management, needed to stack the basic data structure
    2022-01-22 07:19:08下载
    积分:1
  • chain matrix multiplication to solve the problem through dynamic programming met...
    求解矩阵链相乘的问题,通过动态规划的方法,来求解该问题,使得矩阵链的相乘的运算最少。-chain matrix multiplication to solve the problem through dynamic programming methods to solve the problem, making the chain matrix multiplication operator at least.
    2022-03-14 04:42:57下载
    积分:1
  • (1)输入E条弧<j,k>,建立AOE
    (1)输入E条弧,建立AOE-网的存储结构 (2)从源点v出发,令ve[0]=0,按拓扑排序求其余各项顶点的最早发生时间ve[i](1=2). (4)根据各顶点的ve和vl值,求每条弧s的最早发生时间e(s)和最迟开始时间l(s).若某条弧满足条件e(s)=l(s),则为关键活动.-(1) E importation of Arc lt; J, kgt; Establish AOE- network storage structure (2) v starting point source, ve [0] = 0, by topological sorting point for the rest of the earliest timing ve [i] (1LT ; = ilt; = n-1). if the Topography vertex orderly sequence number is less than net n vertices, a statement that net presence in Central, not for Critical Path, algorithm implementation steps to terminate or (3) (3) from the Department of v starting point, Vl [n-1] = ve [n-1], by the inverse order for the remaining topology of the latest occurrence of peak time Vl [i] (n-inversion; = IGT; = 2). (4) According to the apex of ve and Vl value for each s arc of the earliest timing e (s) and the latest starting time
    2022-03-20 01:39:05下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载