15,791,570 members
1.00/5 (1 vote)
See more:
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.

For example we have this array;
image

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]

How can i find find all cycles in this array.

Thanks for any help.
Posted
Updated 11-May-13 13:14pm
v2

Solution 1

You already posted this question at http://www.codeproject.com/Messages/4562355/Finding-cycle-in-2-dimensional-array-Stepping-Ston.aspx[^]. Please post in one forum only.

htkaya 11-May-13 13:32pm
sorry i tought i deleted already. it is deleted now.
Lutosław 4-Jun-13 18:39pm
Could you precisely define what a "cycle" is?
Richard MacCutchan 5-Jun-13 3:47am
1. Why are you looking into a question that's nearly a month old and obviously of no further interest to the OP.
2. Why are you posting this question to me.
Lutosław 5-Jun-13 4:12am
I apologise. I had found the question interesting but hit a wrong button. (There are two "Have a Question or Comment?". Enough for me to get lost.)
Did OP got a notification or should I repost my question?