Knuth–Morris–Pratt algorithm: Difference between revisions

Content deleted Content added
Undid revision 895885186 by 100.34.22.212 (talk) inline ref; blog; off topic
Gslin (talk | contribs)
avoid extra space line.
Line 1:
<!--If you are thinking of adding an implementation of this algorithm in a particular language, think again. See the talk page.-->
 
In [[computer science]], the '''Knuth–Morris–Pratt [[string-searching algorithm]]''' (or '''KMP algorithm''') searches for occurrences of a "word" <code>W</code> within a main "text string" <code>S</code> 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.