title: Finding cycle in 2 dimensional array
body: <p>Hi i want to find cycles in 2 dimensional(nxm) array. i have n.m-1 filled cell in my array and i want to find cycle starting empty cell, continues in filled cells an finish in empty cell.</p>
  
  <p>For example we have this array;</p>
  
  <p><img src="https://i.imgur.com/Zs8XhqU.png?1" alt="array"></p>
  
  <p>our first cycle is [0,0],[0,3],[2,3],[2,0]
  second cycle is [0,1],[0,3],[2,3],[2,2],[3,2],[3,1]</p>
  
  <p>How can i find find all cycles in this array.</p>
  
  <p>Thanks.</p>