We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Piggybacking on a few complaints made here, I think that labeling this challenge as "easy" is a bit misleading. The amount of rational required to solve it seems fairly close to another challenge in this section called "Connected Cell in a Grid" and that one is labeled as "Moderate". Regardless, easy or not, this challenge is a great quest and the sum of points awarded is reasonable.
For those struggling, try a recursive "Depth First Search" approach where you bubble up information about the amount of forks in the path leading up to the exit point, denoted as a * in the grid. There will only be one path to the exit point, all others will terminate in a dead end and you should discard all information related to those useless paths.
Here's an informal test case to help you catch some edge cases:
5
3 6
*.M...
.X.X.X
XXX...
1
3 6
*..M..
.X.X.X
XXX...
2
3 6
*M....
.X.X.X
XXX...
1
3 6
*....M
.X.X.X
XXX...
2
3 6
*.....
.X.X.X
XXX.M.
3
Count Luck
You are viewing a single comment's thread. Return to all comments →
Piggybacking on a few complaints made here, I think that labeling this challenge as "easy" is a bit misleading. The amount of rational required to solve it seems fairly close to another challenge in this section called "Connected Cell in a Grid" and that one is labeled as "Moderate". Regardless, easy or not, this challenge is a great quest and the sum of points awarded is reasonable.
For those struggling, try a recursive "Depth First Search" approach where you bubble up information about the amount of forks in the path leading up to the exit point, denoted as a * in the grid. There will only be one path to the exit point, all others will terminate in a dead end and you should discard all information related to those useless paths.
Here's an informal test case to help you catch some edge cases:
5
3 6
*.M...
.X.X.X
XXX...
1
3 6
*..M..
.X.X.X
XXX...
2
3 6
*M....
.X.X.X
XXX...
1
3 6
*....M
.X.X.X
XXX...
2
3 6
*.....
.X.X.X
XXX.M.
3
All five should return "Impressed".