Boyer–Moore–Horspool algorithm

Back

Is an algorithm for finding substrings in strings with average-case complexity of O(n) and worst case O(mn)

It is a simplification of Boyer-Moore algorithm, it uses only the bad suffix rule

Reference Implementation