View Single Post
Old May 6th, 2006, 12:32 PM   #1
Sane
Programming Guru
 
Sane's Avatar
 
Join Date: Apr 2005
Location: Waterloo, Ontario
Posts: 2,013
Rep Power: 6 Sane will become famous soon enough
Send a message via MSN to Sane
Recursive Function For Testing A Connection?

I have a two dimensional grid, and need to test if any given point on the grid is connected to any side of the grid, through any other combination of points. Would a recursive function be the best way to do this? If so, how would I do that without ending up with infinite recursion?

If recursion isn't the best option, my other thought was some straight loops, but I'm getting tired of that crap.


Edit: Wrong forum. I meant to put this in "Other Scripting Languages", not "Other Web Development". Move please. :o
Sane is offline   Reply With Quote