Aho-Corasick ·
One Pass, Many Patterns
un
seel
.com · trie + failure + output · O(n + m + z)
Patterns
{he, she, his, hers}
Matches
0
State
—
Trie edge
Failure link
Output link / match
Active state
▶ Play
←
→
🔇 Unmute
Reset
Un
seel
.com · Aho-Corasick Multi-Pattern