Ad
  • Default User Avatar

    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?

  • Default User Avatar

    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.

  • Default User Avatar

    my evil twin enjoys the thought of people bashing their head on the keyboard when they find they jumped to some wrong conclusion by not reading the spec

    He'll be happy to hear that I completely missed the rule about trains that start at a station...

  • Default User Avatar

    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?

  • Default User Avatar

    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?

  • Default User Avatar

    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.

  • Default User Avatar

    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.

  • Default User Avatar

    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.

  • Default User Avatar
    1. I don't think any tests attempt to add to a column that is already full. I didn't need to check for it.
    2. No, often there are moves after the winning move and you need to detect the first one.
  • Default User Avatar

    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.