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.
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. :)
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!
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]
.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:
And the task to move from 2, 2 to 5, 1. Result should be 13 in that case.
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.
Just a minor typo: "of a Spy" in your description should be "or a Spy".
Tested with C#. Different input classes might be better. E.g. Tuple<string, int> instead of object[].
Add closing brackets to the initial solution.
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".
Description should state that the task is to round to the next multiple of 5.
Boolean requires using System, either change to bool or add using statement.