Concepts2
ποΈ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 StructureIntermediate
DSU with Weighted Edges
A DSU with weighted edges (also called a potential or difference-constraint union-find) maintains relative values between elements while still supporting near-constant-time merges and finds.
#dsu#union-find#weighted edges+11