Groups
Category
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.
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.