title: Find minimum difference between Max and min element of row made from one element from each column in column wise sorted Matrix
body: <p>I came across a problem but not able to get a better approach than O(m X n)</p>
  
  <p>A 2D array contains column wise sorted array, Is there any way to choose one element from each column and create a row such that the difference of maximum and minimum element in that row should be minimum. for example</p>
  
  <pre><code>A = 1  2  5
      3  4  15
      7 11  17
  </code></pre>
  
  <p>The answer should be 2 as u can choose 3 from first col, 4 from second and 5 from third making row 3 4 5 making max - min 2.</p>
  
  <p>Is there a way to get this in O(Row * Col)</p>
  
  <p>Ps: Its not from any ongoing competition.</p>