title: Given k sets of integers find the minimum difference between k elements chosen
body: <p>I have an algorithmic problem.Given k sets of integers>0(which are not the same size necessarily) ,I must pick k numbers one from each set so that the difference between the maximum value and the minimum value is minimum.
  Example:
  k=5 </p>
  
  <p>set 1:89 45 22 16</p>
  
  <p>set 2:89 34</p>
  
  <p>set 3:37 62 89</p>
  
  <p>set 4:89 96</p>
  
  <p>set 5:89 91 94</p>
  
  <p>Answer: pick 89 from all sets difference 0.</p>
  
  <p>Example 2(more difficult)
  k=5 </p>
  
  <p>set 1:12 19 44 52 59 100</p>
  
  <p>set 2:35 60 90 94 98 101</p>
  
  <p>set 3:48 49 57 64 78 90</p>
  
  <p>set 4:15 38 56 90 97</p>
  
  <p>set 5:54 58 59 89 202</p>
  
  <p>Answer: k elements picked:52,60,57,56,54) difference 60-52=8.</p>
  
  <p>Any suggestions on how to approach?</p>