CSE 2320: Algorithms and
Naive String Matching
Utilize a prefix array
[q] contains information to compute
(q, a) for (a
), the pattern shift for a mismatch on P[q].
requires only O(m) time (as opposed to O(m
Copyright © 1998 The University of Texas at Arlington