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.
There seems to be some sort of pattern going on if you examine enough of the results, but the only concrete pattern I could see is that 'n' has to be a multiple of 3 (which can improve the current best solution efficiency).
If the last 2 digits of k are 05|21|26|42|47|63|68|84|89 then n = 9.
39|76 : n = 18.
54|61|75|82 : n = 27.
43|64 : n = 36.
69 : n = 45.
32 : n = 54.
This solutions efficiency can be improved by making the 'n' increment by a step of 3 - the final value of n will always be a multiple of 3.
Clear and concise
Ah yes! Thank you.
The string comparison is comparing the first digit, and 5 is greater than 1, so it terminates the comparison. If they were equal it would proceed to the next digit.
I thought solutions (and therefore comments on them) were only visible to those who had completed the kata anyway?
This comment is hidden because it contains spoiler information about the solution
Can you explain what the concept/s of the syntax is here please? Is it anonymous arrow functions and currying? I understand what's going on with the second line being utilized in the first, just not how the two lines are connected together as (...)(...). Thanks.