Advanced data structuresExplained
Suffix Automaton
The smallest automaton accepting all suffixes of a string.
Time
O(n)
Extra space
O(n)
Use it for
Substring counting and matching.
The smallest automaton accepting all suffixes of a string.
Time
O(n)
Extra space
O(n)
Use it for
Substring counting and matching.