Noktec / Knuth-Morris-Pratt

Knuth-Morris-Pratt Algorithm

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Knuth-Morris-Pratt Algorithm

This is an implementation of the KMP algorithm. This algorithm is used to find a single patternequation of length m within an alphabet of equation2 in a text equation3 of length n.

Getting Started

*To compile the library, and use the example :

$ sudo make

*To use the KMP library in your projects create a main.c file and use the following functions :

searchKMP(pattern,m,text,n);

Where the different variables correspond to the description of the KMP Algorithm.

References

  • Donald E. Knuth, James H. Morris, and Vaughan R. Pratt. SIAM Journal on Computing 6(2):323--350 (March 1977), Fast Pattern Matching in Strings.

License

This code is released under The MIT License.

About

Knuth-Morris-Pratt Algorithm


Languages

Language:C 100.0%