Finding a word which is not a substring of another word
<p>how can one find a word of length say x 
which is not a substring of another word of length y ,
where </p>

<p>x
&lt;
y?
e.g</p>

<pre><code>word is - apple
req word - ape
word is aaabbab
req word - aba
</code></pre>
