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.
Nice kata!
Ah, thanks. I didn't realise that was part of the solution's criteria.
you are going down, right, up, right etc. so
[1, 4, 5, 2, 3, 6, 9, 8, 7]
is not a valid solution given the instructionsFor the
n = 3
example in the description:[ [1, 2, 3], [4, 5, 6], [7, 8, 9] ]
the following solution is given:
[1, 2, 3, 6, 9, 8, 5, 4, 7]
Why isn't
[1, 4, 5, 2, 3, 6, 9, 8, 7]
also a possible solution?This solution starts and ends with the same number as in the given solution and can be completed in one stroke.
This took me 5 days!!! I really want to say this is far too difficult to be 5 kyu but the solution is really simple once you get it. Thanks for the great kata :)
This comment is hidden because it contains spoiler information about the solution
https://www.codewars.com/kata/reviews/5ca9e6d3b447740001ced48e/groups/5ca9f37f0d70d200013db767
Returning different data types is a bad design.
Duplicate.
Why do you check if the remainder of i/9 and i/7 is equal to 1 or 2?
Needs more tests.
Just added some comments to someone elses solution.
Forgot to remove the print() statement.