Solution of the connected regions task. Here is one solution by "Depth-first search". The solution is in a "Regions_DFS_Recursion" class. The solution has a known issue of an overflow of recursive method calling.
There is a second solution, using the BFS algorithm enables more effective implementation without recursion. It is in the "Regions_BFS" class.
The main class is a "CountOfRegions". You can use it for testing both solutions. You may add test cases directly to the "CountOfRegions" class and call both solutions.
-
Notifications
You must be signed in to change notification settings - Fork 0
DimitriBolt/CountOfRegions
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Тренировка по обходу графа по методу "Поиск в глубину".
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published