title: finding the shortest subsegment
body: <p>I wanted to know which alogrithm should i apply.</p>
  
  <p>Their is a sentence given and a list to words. We have to find the first shortest sub segment that contains all the words in the list of words.</p>
  
  <p>eg: </p>
  
  <blockquote>
    <p>Sentence - this is the best problem i have ever solved</p>
  </blockquote>
  
  <p>List of words -</p>
  
  <blockquote>
    <p>is</p>
    
    <p>best </p>
    
    <p>this</p>
  </blockquote>
  
  <p>The answer should be:</p>
  
  <blockquote>
    <p>this is the best</p>
  </blockquote>
  
  <p>If there are many such sub segments then we have to print the one that contains the smallest number of words and appears first in sentence.</p>