Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Duplicate issue.
Bumping @l4cr0ss and @aruslan123; SIGSEGV on C++. Euphoric kata, wish I could get the credit.
I agree with uuuhhh_meow. The example does not follow from the explanation, but rather serves to complicate the problem unnecessarily. Which is it: do we want to optimize the path such that it visits all the same nodes in the fewest steps? Do we want to optimize the path to be the shortest such that it doesn't explore any new nodes? Or, as in the question, do we want to optimize the path using some arbitrary rule? If the latter, and the question cannot be changed at this point, then the entire description can reflect this to be most clear.
This comment is hidden because it contains spoiler information about the solution
Although this has already been stated, at the risk of exhausting the issue I will reiterate. A set of directions [ N W S E ] would be useless if the goal is to end at a new place, unlike what the problem states, but not quite useless if the goal is to hit something on the way there. This objective of travel is not stated in the question, and the note at the bottom only serves as a seemingly out of place exception to make the kata harder unjustifiably. While it would be advantageous for training purposes to adapt one's code to this exception, it has no logical motivation in the kata. This kata needs to be fixed to removed this.
Advice for the future, if your "else" statement does nothing, it isn't necessary to include.