Concepts3
โ๏ธAlgorithmIntermediate
KMP - Prefix Function Applications
The prefix function ฯ of a string tells, for every position, the length of the longest proper prefix that is also a suffix of the prefix ending there.
#kmp#prefix function#failure function+11
๐๏ธData StructureAdvanced
Aho-Corasick - DP Applications
AhoโCorasick (AC) turns a set of forbidden patterns into a finite automaton that lets you process or generate strings while tracking whether any pattern appears.
#aho-corasick#automaton dp#forbidden substrings+12
๐๏ธData StructureAdvanced
Aho-Corasick Automaton
AhoโCorasick is a trie with failure links that finds all occurrences of many patterns in a single pass over the text.
#aho-corasick#multi-pattern matching#trie+12