aalhour / C-Sharp-Algorithms

:books: :chart_with_upwards_trend: Plug-and-play class-library project of standard Data Structures and Algorithms in C#
MIT License
5.91k stars 1.4k forks source link

Added the Aho-Сorasiсk algorithm #145

Open LIFEfreedom opened 4 years ago

LIFEfreedom commented 4 years ago

Description

Added the Aho-Сorasiсk algorithm, which implements an effective search for all occurrences of all sample strings in a given string. The task. The input receives several lines pattern [i] and line s. Our task is to find all possible occurrences of pattern [i] strings in s.

The essence of the algorithm is to use a data structure - suffix tree and build a finite deterministic automaton on it

Checklist