Recently, I've learned a powerful data structure: Suffix Automaton
, and found out that it can solve lots of problems that can be solved with KMP/Z Function/Hash/...
in average time complexity $$$O(n)$$$.
Now I'm curious to know, what are the pros/cons of this data structure? And is there any problems that can't be solved with Suffix Automaton
but able to solve with others data structure? Thank you in advance!
(for people who doesn't know this data structure: Link 1, Link 2)
eertree returned to the chat