Groups
Category
Level
A sparse matrix stores only its nonzero entries, saving huge amounts of memory when most entries are zero.
Matrix exponentiation turns repeated linear transitions into fast O(n^{3} log k) computation using exponentiation by squaring.
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.