Skip to content

Latest commit

 

History

History

knuth-morris-pratt

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Knuth-Morris-Pratt (KMP) Algorithm

The Knuth-Morris-Pratt string searching algorithm (or KMP algorithm) searches for occurrences of a "substring" within a main "string" by employing the observation that when a mismatch occurs, the word itself embodies sufficient information to determine where the next match could begin, thus bypassing re-examination of previously matched characters.