Sunteți pe pagina 1din 8

CSC 373

Lecture11
By
Javed Siddique
String Matching
• We have a text T and pattern P.
• We want to find the index where pattern P
occurs in text T.
• Size of Text T is n and size of pattern P is a
constant m.
• We will study KMP algorithm. KMP stands
for Knuth Morris Pratt.
Algorithm
Algorithm
Example
Example
Example
Example

S-ar putea să vă placă și