Boyer-Moore-Matcher(T, P, ) n = length(T) m = length(P) = Compute-Last-Occurrence(P, m, ) ; O( + m) = Compute-Good-Suffix(P, m) ; O(m) s = 0 while s n-m ; O(n-m+1) j = m while j > 0 and P[j] = T[s+j] ; O(m) j = j - 1 if j = 0 then print ``Pattern occurs with shift'' s s = s + [0] else s = s + max([j], j - [T[s+j]])