Why it matters
Boyer-Moore is fastest practical matcher. Understanding shapes text tools.
Advertisement
The architecture
Right-to-left comparison.
Bad character rule: shift by mismatch char position.
Good suffix rule: use matched suffix info.
Advertisement
How it works end to end
Preprocess: bad char table + good suffix table.
Skip potentially many characters.
Best case O(n/m).
Worst O(nm) rare.