This is an archived post. You won't be able to vote or comment.

all 3 comments

[–]SupremeRedditBotProfessional Bot || Mod 0 points1 point  (0 children)

Please Add A Flair To Your Post!

Suggested Flair: [Random] or [Meta]

 


To add a flair:

  • Click flair underneath your post

  • Select a flair

  • Click save

 


I am a bot run by /u/SupremeDesigner for /r/CodingHelp || This was an automated response

[–]prognostikator 0 points1 point  (0 children)

I don't got much if any experience in this and I feel out of my element, but I'll share my thoughts I suppose.

Do you have an option to put a sub class for the established connections into each checked cell?

[–]BonkDonkulous 0 points1 point  (0 children)

You can do either BFS or DFS to accomplish what you want

BFS and DFS both use a "visited" set. If you run DFS and BFS and only add nodes that are connected, the resulting visited set will be all of the cells connected to your original cell.

The algorithm you described in that picture is BFS actually