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.
Wow, a one liner!
Correct solution, but note that the empty quotes between the two variables is not needed.
Correct solution, but you do not need the $return variable as you can simply directly return the result.
This comment is hidden because it contains spoiler information about the solution
One of the few examples with a recursive solution. Well done.
Maybe I am just nitpicking, but I am in favor of writing $i < 100000 as $i <= 99999 because that semantically makes more sense to me. You want to check to including the last possible pin number. I guess this is more a personal preference kind of thing.
This comment is hidden because it contains spoiler information about the solution
is there an implied return false? how does that work?
Good solution, where I think it could be a plus to reparate the calculation of the variable and the output of it.
Some minor improvements: You do not need the backslash in "That's". I would also like to have two spaces around the questionmark.
Probably I would be better off refactoring this kata to include some array containing the effectiveness. Also, I did not include the Math.ceil function.
Altho I understand you made the variables a single character to decrease the amount of required typing, I think this is a bad practise in general. In my oppinion it decreased readability because the names of the variables do not tell me what they mean and thus increasing the cognitive load to understand the code.