Given a set of words: S = {“the”, “to”, “presentation”}

And a text T = “textmayrefer**totherepresentatio**nofwrittenlanguage”

Find the index of matching in text T from *all* words of S (one of permutations of S). It guarantees that the substring occurs exactly once in text.

Any idea how to solve this problem? (without bruteforce :()

# Interesting substring matching problem

**tyrant**#1