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.
Unpublishing as a duplicate of https://www.codewars.com/kata/a-knights-tour/
There's no difference.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Nice Kata, I like the idea to use the Warnsdorff's Knights euristic approach instead brute force to solve the proble. Do you do something to avoid a solution withput the euristic approuch? I find this very similar to https://www.codewars.com/kata/a-knights-tour/ it is 4K, what are the main differences between this two katas?
nice kata
This issue has been fixed.
Could you mark as solved please? Thank you.
I tried to corect this, please check and mark as resolved if Ok.
Yes, I was determined to do it without any loops - found a good one line solution I think :)
they have the 'expected' and 'actual' values backwards.. it wants "hello world" (no exclamation point).
sheep is the plural form of sheep. consider changing it to this instead of 'sheeps'
The default test case has this line:
Assert.AreEqual("Team 1 wins!", Kata.tug_o_war(new int[2,5] { {1,2,3,4,6}, {5,4,3,2,1} } ));
which is invalid. the line needs to be
Assert.AreEqual("Team 1 wins!", Kata.tug_o_war(new int[2,5] { new int[]{1,2,3,4,6}, new int[]{5,4,3,2,1} } ));
Marked as major because the tests fail to run due to this even if the users code is valid.
Where the description says "be sure to not count the current cell", it really doesn't matter because you're just looking for the move with the fewest possible subsequent moves. If they could all move back to the current cell, they all have 1 more move; the one with the fewest still has the fewest.
Thank you for catching that, I have updated the test case.
Loading more items...