Search a long string for small strings in an array
Problem Given a string s and an array of smaller strings T, design a method to search s for each small string in T.
Solution Method 1 - Using suffix tree
We can first get all the suffices of s and check for each element t in T to see if t is the beginning part of any suffices. To make this more efficient, we can build a suffix tree and do the operations.
[Read More]