Click here to Skip to main content
15,789,840 members
Please Sign up or sign in to vote.
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;

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.
Updated 11-May-13 13:14pm

1 solution

You already posted this question at[^]. Please post in one forum only.
Share this answer
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?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900