title: Given a set of integer sets S, find the smallest possible set of integers X so that every set in S contains at least one integer also in X
body: <p>Given a set of integer sets S, find the smallest possible set of integers X so that every set in S contains at least one integer also in X.</p>
  
  <p>The smallest set is defined by the set with the lowest cardinality (least number of elements), and if there are multiple sets with the same smallest cardinality, then the smallest set is the set that comes first lexicographically (for example, (1, 3, 6) comes before (1, 4, 5)) </p>
  
  <p>For example, if S is:</p>
  
  <pre><code>{
  (4,7)
  (7,10)
  (4, 15, 18)
  (7, 10, 18)
  (4, 7, 15, 18)
  (7, 10, 18)
  }
  </code></pre>
  
  <p>The smallest possible cardinality for X is 2. Possible sets for X sorted lexicographically with cardinality 2 are: (4,7), (4, 10), (7, 15), (7, 18). Since (4,7) comes earliest it is the solution for X.</p>
  
  <p>What algorithm should be used to solve this problem within a reasonable amount of time?</p>
  
  <p>Some constraints on the input data are as follows:</p>
  
  <ul>
  <li>Every integer will be between 1 to 20</li>
  <li>S will contain at most 100 sets</li>
  <li>Every integer will be in at least 2 sets in S</li>
  <li>Integer sets will always be in increasing order</li>
  </ul>