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.
yes
This comment is hidden because it contains spoiler information about the solution
learnt this from a previous kata. Glad I remembered it and got to use it.
This comment is hidden because it contains spoiler information about the solution
For some reason I did not think of this. I feel humbled.
For some reason i assumed the array would be longer than 3 values
My solution as well...
I think this is clever but it's not something I would leave without comment or in production code
Code works and gives correct answer in a different compiler, but copying and pasting it to CodeWars seems to return the wrong answer after the initial test case. Am I missing something?