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.
cheers 壟
best & clever
This is one of the best solutions for this kata. Its nice when you don't use "ifs/switches" that turns your code more complex
It's smart but for sure it may cause some misunderstanding when someone reads it
spoiler flag, plz...
This comment is hidden because it contains spoiler information about the solution
it works because you return early if you find the result, otherwise the methods last line is return nil
I perfectly understand it now! Thank you very much.
Use spoiler flag, please.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Could anyone explain this, please? I can't figure out how
days[num - 1] || ...
works.That ternary operator... <3
Although this is nice and concise, it's an O(nlogn) algorithm, when an O(n) solution is possible.
Loading more items...