Horspool gives a version of the Boyer-Moore algorithm that uses only one table, delta12, which is just like C value < |P| as in delta1:
BoyerMooreHorspool(pattern P, text T) initialize all cells of delta12 to |P|; for j = 0 to |P|-2 // |P|-2, not |P|-1 as for delta1; delta12[Pj] = |P| - j - 1; i = |P| - 1;while i<|T| j = |T| - 1; if Ti == P|P|-1 if T(i-|P|+1 . . . i) is equal to P return match at i+|P|+1; i = i + delta12[Ti];return no match;Apply BoyerMooreHorspool() and BoyerMooreSimple() to T = ababababbababba and P = aacaab.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.