Applications
Applications
Pattern Matching Problem:
Given a pattern string p and a subject string s,
find out whether p appears in s as a substring.
This is an important search problem.
See Exercises 3.26 and 3.27.
The trick is to avoid O(|p|*|s|) algorithm.