3 ms·
Fast String Searching With Suffix Trees
Summary: Building a Suffix Tree (in O(n) time and space) allows you to search for substrings in O(m) time (m being size of substring).
Link is to article describing algorithm and giving sample code in C++.
- Xichekolas 18y agoSummary: Building a Suffix Tree (in O(n) time and space) allows you to search for substrings in O(m) time (m being size of substring). Link is to article describing algorithm and giving sample code in C++.