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
βοΈAlgorithmIntermediate
KMP Algorithm
The KMP algorithm finds all occurrences of a pattern in a text in O(n + m) time by never re-checking characters that are already known to match or mismatch.
#kmp algorithm#prefix function#failure function+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