title: How can i find the closest path in matrix that A to any B?
body: <p>For example:</p>
  
  <p><code>m_array = new int[6][6];<br />
  m_array[0] = new int[]{2, 0, 0, 0, 0, 0};<br />
  m_array[1] = new int[]{0, 2, 0, 0, 0, 2};<br />
  m_array[2] = new int[]{2, 0, 0, 1, 0, 0};<br />
  m_array[3] = new int[]{0, 0, 0, 0, 0, 0};<br />
  m_array[4] = new int[]{0, 2, 0, 0, 2, 0};<br />
  m_array[5] = new int[]{0, 0, 2, 0, 0, 0};<br />
  </code></p>
  
  <p>How can i find the the closest 2 to 1?</p>
  
  <p>i want a function that it return an array path include points of array. For example i will give the "m_array" to my function and it will return to me the nearest 2 for 1, an array path like [2,3][3,4][4,4]</p>