-
Notifications
You must be signed in to change notification settings - Fork 20.8k
Description
What would you like to Propose?
Adding Aho–Corasick algorithm.
wiki - https://en.wikipedia.org/wiki/Aho%E2%80%93Corasick_algorithm
Summary (From wiki):
The Aho–Corasick algorithm is a string-searching algorithm. It is a kind of dictionary-matching algorithm that locates elements of a finite set of strings (the "dictionary") within an input text. It matches all strings simultaneously. The complexity of the algorithm is linear in the length of the strings plus the length of the searched text plus the number of output matches. Note that because all matches are found, there can be a quadratic number of matches if every substring matches (e.g. dictionary = a, aa, aaa, aaaa and input string is aaaa).
Issue details
Brief details about Aho-Corasick algorithm can be found by landing on above wiki page.
Summary of requirements to understand and implement it -
- Understanding of Trie
- Understanding of how tree works
- Basics of DFA/NFA (automatas)
Additional Information
No response