Date: Sun, 30 Nov 1997 22:37:39 -0600 (CST) From: Andrew Deren To: djgpp Subject: Looking for connected of 3 Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk Does anyone know of an algorithm to look through 2 dimensional array and find 3 values next to each other. Let's say I have an array 10x10 and it's all zeros exept at some points where it's some value and I want to check if there is a connection between the values and if 3 of them are connected then i want to clear them to zero. ex. 0 0 0 0 0 x x 0 0 x 0 0 0 0 0 0 this is one of the cases, and there could be more than 3 connected and all of them have to be cleared. The connections can only be on the sides, not diagonal. Thanks. ,,, (0 0) +-------------oOO----(_)-------------------+ | Andrew Deren | | aderen AT eecs DOT uic DOT edu | | www.eecs.uic.edu/~aderen/ader/main.html | +-------------------------oOO--------------+ || || ooO Ooo