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
The same method as mine, just more verbose but also probably more readable.
I kind of get it, but not fully.
This comment is hidden because it contains spoiler information about the solution
This is that solution that makes you kick yourself for not thinking of it. Very elegant.
This comment is hidden because it contains spoiler information about the solution
This is my favorite solution. It is actually pretty dam elegant!
i just came here to ask this too
'bitwise op' just removes decimals part,
but Math.floor(...) actually round a number down as it said lately 'mr royce-reed',
so it also behave pretty weird when we working with numbers
which not contains into int-type(border:+-2147483647)
StackOverflow question:
https://stackoverflow.com/questions/13847053/difference-between-and-math-floor
not really
~~
is just shorthand forMath.floor()
and the plus sign is just a plus sign 😝OP did recursion instead of iterating ... slick but hard to read
Don't need the ternary since count can never be even. LOL Remnant of trying something earlier.
it's a nested function
Thanks, I got it because I did it by hand and got different results than using charCodeAt() and didn't understand because I just kept thinking "what is the difference, every letter is just +96" but when you break it down I understand the math better
Strange that I got it working and the answer has solid hint is in here (only read this after I got it) I don't understand yet the mathmatical difference.
Loading more items...