Boyer-Moore-Horspool
Finds every place a pattern stands in a text, skipping ahead. A table from the pattern says how far it may jump for each letter. At each place it compares from the pattern's last letter back, then jumps as far as the table allows for the text letter under the pattern's last letter.
the text, with the pattern under it
how far the pattern may jump, by the text letter under its last letter (* any other letter)
- letters compared
- 0
step 1 of 1
Examples