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.
This comment is hidden because it contains spoiler information about the solution
Rock, Paper, Scissors without conditional logic.
And remember, 5am coding leads to erroneously calling a variable the "mean" when it clearly isn't divided by the number of values.
Oh man, looks like I skim-read the instructions and ended up bringing the pepper shaker instead of the salt. I should have paid more attention to that second drawn matrix, rather than looking at the first three elements and thinking "yeah I get it". I've finished the code for real now, and it's now a lot cleaner. Great kata and thank you both for the information.
I've written a function which I am almost certain should solve this kata, but I am having a couple of issues.
If I click "Test", I get a failure message as the sample test which includes a 36-element array seems to want the numbers in ascending numerical order [1, 2, 3, 4, 5, 6, 7, 8, ..., 36] rather than the actual spiral pattern of [1, 2, 3, 4, 5, 6, 12, 18, 24, 30, 36, 35, 34, ..., 21].
However, even if I hard code in an ascending numerical order for 36 elements, I am having an issue when I click "Attempt", where the numbers in the given array are not 1 to n, but instead seemingly random unordered numbers, such as [793, 58, 556, 635, 246, ..., 385].