Boyer-Moore-Horspool — One Shift Table, Keyed on the Window's Last Character

Align the window, compare right-to-left, and on match or mismatch shift by shift[T[i+m-1]] — the table value of the text char aligned with the pattern's last position. No good-suffix rule.

step 0

Text & sliding window

Press Step to align the pattern at position 0 and compare from the right.
window char matched char mismatched shift key char

Shift table (built from the pattern)

Horspool: for j = 0..m-2 (exclude last char), shift[P[j]] = m-1-j; default m.
We build one bad-character table from the pattern, then slide the window. On every step the shift is the table value of a single text character — the one aligned with the window's last position (Horspool) or just past the window (Sunday).
Self-contained visualization. Horspool drops Boyer-Moore's good-suffix rule and keeps only this single shift — tiny code, near-Boyer-Moore average speed, O(nm) worst case. See junior.md and professional.md for the proof that this shift never skips a match.