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.
If you manage to know how to calculate the appearance of a number appears from 0 to a full round number (1, 20, 500), you have it.
This comment is hidden because it contains spoiler information about the solution
Not really into using recursion to calculate fibonacci numbers, I prefer iteration...
This solution just blew my mind
Not only is much more efficient, but in this specific case, it´s also really easy :-/
Hahaha, we got almost the same code.
This comment is hidden because it contains spoiler information about the solution
Very smart way to resolve this kata
Sorry if I expressed myself badly. I don't really care about iteration per se, but seems lazy to just resolve every problem iterating through strings.
These kind of kata shows how many people doesn't even want to think about the basic maths involved in the solutions and opt for the classic 'toString'and iterations. :-/
This is really the smart and correct way to handle this kata.
I submitted one myself, feel free to delve into it (I also don't think very highly of it, but it works and bests iterative approachs).
I made my solution with a pure (more or less) math approach, just because the sensei asked for it and it itched me to try.
I've made just a few performance tests and it is much more efficient than the iterative approach (less than 1 ms even with a range of [-500000,500000]), even though I think it could be easily improved further.
Thank you for this kata, I think it has really made me think out of the usual (easier) solutions.
Interesting and clever, but has the worst performance (always N, even in the best case, like {50,20}).
I don't get why do you keep watch of the amount of 100 dollars bills.
Loading more items...