I saw this problem on the article about aho corasick algorithm, and they have given its solution like this. I didn't understand that how is it working as we will be having directed cycles in the automata?
Finding the shortest string containing all given strings?
I saw this problem on the article about aho corasick algorithm, and they have given its solution like this. I didn't understand that how is it working as we will be having directed cycles in the automata?