Codeforces Round 1133 (Div. 1, Div. 2) is coming soon! Register here. ×

what is the best way to store aho corasick output link?
Difference between en1 and en2, changed 0 character(s)
Recently i learnt Aho-Corasick Algorithm for Pattern Searching. To find all occurrences of pattern strings in text string.↵
i store all possible output links in my prefix tree(trie)<br><br>But case such as<br>↵
<b>↵
text = aaaaa <br>↵
pattern = {a, aa, aaa, aaaa, aaaaa} <br>↵
</b>↵
will give me huge number of output link!↵
↵
[my implementation](https://ideone.com/sPGOwN)↵
is there a better way to store them?↵
↵

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English err0r 2018-05-21 13:58:21 0 (published)
en1 English err0r 2018-05-21 13:56:12 470 Initial revision (saved to drafts)