Aho-Corasick algorithm Implementation of the algorithm The task is to find all occurrences of patterns in a string. Input example: abrachkacadabrachka 4 abrachka cadabrachka ab marazmik Output: 2 1 12 1 9 2 1 12 0