Ad
  • 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

    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

    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[].

  • Default User Avatar

    Add closing brackets to the initial solution.

  • Default 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

    Description should state that the task is to round to the next multiple of 5.

  • Custom User Avatar

    Boolean requires using System, either change to bool or add using statement.