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.
Nice one. I pretty much had the same approach, but I split the modification of the min and max values in 2 map methods. That simplifies the min-max logic for the reader imo.
This comment is hidden because it contains spoiler information about the solution
What do you use to test the speed of a piece of code/application?
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Can you give a concrete example to test against?
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
Personally I dislike falsy values. It makes the code a bit harder to understand. I tend to use boolean values instead when I can, always.
I would still use
else if
. It makes clearer for the reader what is going on on a glance. That said it doesn't matter for how the code runs withreturn
.That's interesting. Messed around with it to see if I could fix it. Shamelessly stole some code to change the encoding from and to UCS-2 to make it work.
This comment is hidden because it contains spoiler information about the solution
Very nice. Didn't think of using slice myself! ( I used the accumulator in a reducer instead ).
This comment is hidden because it contains spoiler information about the solution