Quantcast
Channel: CodeChef Discuss - latest questions
Viewing all articles
Browse latest Browse all 39796

Interesting substring matching problem

$
0
0

Given a set of words: S = {"the", "to", "presentation"}
And a text T = "textmayrefertotherepresentationofwrittenlanguage"
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 :()


Viewing all articles
Browse latest Browse all 39796

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>