title: How to auto generate regex from given list of strings?
body: <p>You are given 2 lists of Strings - A and B. Find the shortest regex that matches all strings in A and none in B. Note that this regex can match/not-match other strings that are not in A and not in B. For simplicity, we can assume the that our alphabet size is just 2 characters - 0 and 1. Also only these operators are allowed:</p>
  
  <p>* - 0 or more<br/>
  ? - 0 or 1<br/>
  + - 1 or more<br/>
  () - brackets<br/></p>
  
  <p>For simplicity the regex not operator is not allowed. I don't know if allowing the or operator (|) would simplify the problem or not. A and B ofcourse would have no common elements. Here are some examples:<br/></p>
  
  <pre><code>A=[00,01,10]
  B=[11]
  answer = 1*0+1*
  </code></pre>
  
  <p><br/></p>
  
  <pre><code>A=[00,01,11]
  B=[10]
  answer = 0*1*
  </code></pre>