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.
Ooops, sorry, this comment applied to Pathfinder #1, not #4 - I'm not sure how I manged to post it here!
Can you delete it?
You do need to be fast. In the C# version there are almost 2000 tests and you only have 12000ms, so that's only 6ms per test! The largest mazes I've seen were 100x100. For me, the difference between failure and success was converting a LINQ 'contains' function to checking an array of booleans.
I feel that performance constaints like that should be clearly stated in the instructions, not left as a nasty surprise that we only discover after passing all the sample tests.
He'll be happy to hear that I completely missed the rule about trains that start at a station...
Another great one, thank you!
I really like how your descriptions are intuitive and make the problem sound simple, but the actual implementation is quite tricky. Problems are always bugs in my code rather than unclear requirements - if only they were all like that!
Personally, I'd have prefered most of the tests to be available in the example box so that I could paste them into VisualStudio and use its debugger. Here I had to recreate lots of the 'hidden' tests, which isn't a big problem, but it's nice when I can just copy them and gradually improve my code to address them one at a time. Maybe that's supposed to be part of the challenge? Or maybe people who use other languages do all their work in the CodeWars editor?
Another great kata, thank you!
One suggestion though: the 'breadcrumb' tests require a rule that I don't think is adequately covered by the description. "If you come to an ambiguous corner but you've already visited one of the options, then it doesn't count as ambiguous."
People who don't recognise the cultural significance of Hansel and Gretal leaving a trail of breadcrumbs might not realise why those tests count as valid lines, and not ambiguous loops. Is the story widely known in (for example) East Asia?
I think there's a mistake in the C# description. The 'progress as we near an "interesting" number' section has zeros for all the expected values.
I really liked this Kata because it's about OO programming rather than maths, but I found it frustrating that many of the tests check behaviour that is not specified in the description. A well written programme would probably throw a ArgumentOutOfRangeException if you try to create a car with a negative amount of fuel, or refuel by a negative amount - here we have to work out the required behaviour by reverse engineering the test.
How fast do my solution have to be to pass? On my local machine it's solving a 100x100 maze in 300ms, but it still times out when I submit it.
The following warning appears when attempting in C#: "tests/Fixture.cs(150,41): warning CS0168: The variable 'e' is declared but never used". Also, it's not possible to just copy and past the tests into visual studio because they rely on TestTools.