title: How to find smallest substring which contains all characters from a given string?
body: <p>I have recently come across an interesting question on strings. Suppose you are given following:<br><br></p>
  
  <pre><code>Input string1: "this is a test string"
  Input string2: "tist"
  Output string: "t stri"
  </code></pre>
  
  <p>So, given above, how can I approach towards finding smallest substring of string1 that contains all the characters from string 2?</p>