Content deleted Content added
Added the content about how this algorithm works and compare with naive string matching algorithm Tags: Visual edit Mobile edit Mobile web edit |
Remove grammatically incorrect sentence that didn't add valuable information (and wasn't sourced) anyway |
||
Line 4:
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.
The [[algorithm]] was conceived in 1970 by [[Donald Knuth]] and [[Vaughan Pratt]], and independently by [[James H. Morris]].This is the first linear time algorithm for string matching.
| language = ru
| last1 = Матиясевич
|