Aho-corasick

2 articles

dsa2 min read

Aho-Corasick — Multi-Pattern String Matching

Aho-Corasick automaton matches all patterns simultaneously in O(n+m+z) where z is the number of matches. Builds failure links on a trie for efficient multi-pattern search.

Read →