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
To me, that's actually rotating the first string BACKWARDS, not forward... But other than that, the exercise is nice.. :)
This comment is hidden because it contains spoiler information about the solution
The problem simply asks for the biggest sum of x ammount of numbers under a certain value. The story makes absolutely no sense, since you wouldn't have ALL the distance options from every city, and hence in reality you couldn't pick random distances (unless you had the option of teletransporting from town to town).
Really think about it, the story here makes no practical sense..
Absolutely silly.. You've worked it out only to give the answers, instead of actually solving it!! :P
This comment is hidden because it contains spoiler information about the solution
To return a function, you simply... return a function!! :)
For example:
I've written this answer based on another one I saw, to prove that the test is wrong. This solution actually FAILS to verify all Leap Years!!!!
Well, this solution is wrong, yes.. But actually the year 2000 IS a leap year, because it is multiple of 400..
;)