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.
it is recursive so solution is the function name and calling itself again inside
Does anybody care to explain this? I don't see where the function iterates through the string. I see it returning the larger of two options, digits[0, 5] and ... this "solution(digits.substr(1)". digits.substr(1) means go from [1] to the end of the string. I don't know what the word solution is doing. Google didn't turn up a method or anything so it looks to me like a variable instantiation.
When I tried to complete this kata first time in Java version,I used "double type" several times and failed when submitted.
I thought and realized,I had to change my mind and use "double type" only once.
As the description says:truncate at last.
The math in this kata is easy,but the process of thinking is cool!
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution