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.
That's the reason of my answer but I am doing my best. Anyway I asked this 4 months ago and now I understand it and noticed is pretty obvious. Thanks for the answer.
There is some recursion there. Please deep your knowledge about it!
nice smart love it!
Oh, I see. Thanks so much!
It's just recursion, first return calls the same function while changing the argument, but in this case it looks redundant, you can achieve same results with simple loop. Second return just returns value when you reached your condition and don't need to make more calls.
Can anyone tell me the reason of two returns? Newbie dumb here in Python. Thanks.
just hope years doesn't get over 1000 lol
good use of recursion
Cool recursive solution ... however, for people who might actually think this is best practice:
For a problem like this you should only do recursion in a language thats supports tail call optimization.
Python does not (at least out of the box at this time as I understand)
There really should be a clear reason for recursion, usually clarity. In this case I don't see it - but meh - that's subjective.
that's the juice of genius
Clever recursion, good show!
It will work but I believe looping would be more efficient.
Agree, I don't think this solution the best practice.
recursion is inefficient compared to loop
it's when fucntion calls itself
Loading more items...