title: Closed path in the two-dimensional array
body: <p>There is two-dimensional array of zeros and ones. Need algorithm (the implementation) that determines whether in this array closed path of ones, that surround the zeros</p>
  
  <p><strong>Example:</strong></p>
  
  <p>there EXISTS a closed path(center):</p>
  
  <pre><code>1 0 0 0 0
  0 0 1 0 0
  0 1 0 1 0
  0 0 1 1 0
  0 0 1 0 0
  </code></pre>
  
  <p>there is NO</p>
  
  <pre><code>0 0 0 0 1 
  0 1 0 1 0
  0 0 1 0 0
  0 0 1 0 1
  0 1 0 1 0
  </code></pre>