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)
But case such as
text = aaaaa
pattern = {a, aa, aaa, aaaa, aaaaa}
will give me huge number of output link!
my implementation is there a better way to store them?