Knuth-Morris-Pratt (KMP) algorithm (Single String Search String Search)
Jump to navigation
Jump to search
Time Complexity
$O(m+n)$
Space Complexity
$O(m)$ words
(https://pdfs.semanticscholar.org/4479/9559a1067e06b5a6bf052f8f10637707928f.pdf)
Description
Automaton-based
Approximate?
Exact
Randomized?
No, deterministic
Model of Computation
Word RAM
Year
1977
Reference
https://pdfs.semanticscholar.org/4479/9559a1067e06b5a6bf052f8f10637707928f.pdf