Next:
Up:
Previous:
String Matching
Simple problem with many applications
text editing
pattern recognition
Algorithms
Naive O((n-m+1)m) worst case
Rabin and Karp O((n-m+1)m) worst case, but better on average
Finite Automaton O(n+m
)
Knuth-Morris-Pratt O(n+m)
Boyer and Moore O((n-m+1)m+
) worst case, but better (best overall) in practice
Next:
Up:
Previous: