Ad
  • Custom User Avatar

    So now the issue is closed.

  • Custom User Avatar

    I fixed it. This issue can be closed.

  • Custom User Avatar

    Hi Frank, I think doing the 4x4 first is a good introduction to this kind of puzzle. And it was a good thing to have the brute force approach as a reliable starting point for a more sophisticated approach. So yeah, IMO it's a good recommendation. :)

  • Custom User Avatar

    Hi Splendid, thanks for your compliment and effort on solving this kata! I really like your solution, it is short with nice optimizations. I start to wonder if my recommendation to do the 4x4 first really helps, because the 4x4 can be solved by brute force while the 6x6 requires a different strategy. What do you think?

  • Custom User Avatar

    Nice Kata. I was naive enough to think that my simple solution for the 4x4 would work here. A lot of optimizations later ... finally solved. Thumbs up for the idea!

  • Custom User Avatar

    Tested with C#: The public test cases are missing an using NUnit.Framework;
    The description for Input and Output should probably say [0-9] instead of [1-9].

  • Custom User Avatar

    Great idea and nice Kata!
    Would be cool to also have alternative paths and require to find the shortest one. For example take this "maze", which actually consists of two rooms:

    0,0,0,0,0,0,0,0,0,
    0,1,1,1,0,1,1,1,0,
    0,1,1,1,0,1,1,1,0,
    0,1,1,1,0,0,0,1,0,
    0,1,1,1,1,1,1,1,0,
    0,0,0,0,0,0,0,0,0
    

    And the task to move from 2, 2 to 5, 1. Result should be 13 in that case.

  • Custom User Avatar

    The InvertTree method should be static initially.
    It would also be good to specify whether the tree shall be inverted in-place (i.e. the existing object shall be changed) or an inverted copy shall be returned.

  • Custom User Avatar

    Thanks for suggestion. Yes, "object[]" doesn't look nice, I will modify it later to Tuple or simple strings.

  • Custom User Avatar

    Thanks, fixed now.

  • Custom User Avatar

    Just a minor typo: "of a Spy" in your description should be "or a Spy".

  • Custom User Avatar

    Tested with C#. Different input classes might be better. E.g. Tuple<string, int> instead of object[].

  • Custom User Avatar

    Add closing brackets to the initial solution.

  • Custom User Avatar

    Yes sorry, I was referring to the C# version. To use the Boolean type, the System namespace must be included, which is done by putting "using System;" above the class definition. Alternatively the return type could be changed to the primitive type "bool".

  • Custom User Avatar

    I believe he's refering to C#

  • Loading more items...