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
looks like sonic.exe
I think that it depends on the language and its translations. In JavaScript, mother has alyways a child. If you get tests without children, then you can assume that its not required ;)
I want to be able to use the lower of those two numbers to run the operation because it will then require fewer recursive calls.
resetting the recursion limit takes place in order to allow Python to go to a deeper than normal recursion depth.
ceil
is used on the valuea
because it could be afloat
, andint
is needed forsetrecursionlimit
.the
return
statement is a double-ternary, which in a standard syntax look like this:Click on
fork
and try it out by yourself.c == 0
is a named argument set to a default value of0
for the recursive method. It holds an incrementing value to eventually be returned as the result.Because I wanted to solve it without the
*
operator using recursion. I often learn valuable things by trying alternate methods and generally playing with code.Of course I can solve the kata in 1 or 2 lines, but should I why bother making that?
I don't get what is funny about the code or kumite
In which language ?
In Python, it does contain 5 strings, each string composed of one character.
ok, boys, that's enough.
If I see just one message here from one of you, still going on with these stupidities, or one single new message reported on the mod board, I'll just entrap both of you.
Is that clear enough?
You stop it too, and whatever problem you have, get over it. If you want to chat with someone, find a chat software.
Reading through all these lame complaints scrolling through the dashboard is just boring.
You are clearly misunderstanding what I said. It is in your perspective, since based on what you think about my code, you will consider long code as ineffective and a "stupid solution" although is passes tests. Any code that passes tests are valid code. Valid code is effective code.
Boulli did very well, since he came up with an incredibly smart way of solving the problem. Yes, it's long, but it is still good code. He was smart enough to realize that there were a limited amount of colors that were in the random tests, so he did the smartest way that takes almost no effort to solve the problem
Loading more items...