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.
You need to achieve O(log(n))
For "expected null but was 163" the input was not the one you give. It is a "Sample Tests:" so you can read it.
neither lmao
.
You sure about that? Doesn't sound right to me, and this doesn't support your claim:
from mdn (which I linked to above):
which means 101 should come first, and it seems to do so here. it would be surprising if it didn't. and it is insane (actually it's not so crazy for mixed types, but you'd get the same result for
[2, 101]
).My guess is that you are sorting twice and that the non-stable sort is what gets you?
You might be relying on
Array.prototype.sort
to be stable but that isn't necessarily true for slightly older versions.that's only meaningful if you're running the exact same tests. people keep saying something to that effect and it turns out they did something else and that the difference wasn't from the change of environment
not sure what exactly you're asking. make sure that whatever you're relying on is defined behaviour I guess? and javascript is really really uh.. special, when it comes to comparing things
such a great language :')
I guess you run out of digits. Floating point breaks pretty soon with factorial
It's not the author who gives the kyu. Good you enjoyed it!