Not to mention the performance characteristics on finite lists.
O(n) is possible, why vote an O(n log n) solution Best Practice?
O(n)
O(n log n)
haha wow, solid and suprisingly readable
i'm not french either, but it's an adapted term for admitting defeat, sure to be in the OED
ah, I'm English, not French ;p
it's French. when a fencing opponent gets you with their épée, you admit their success
touché
@Lurvetti i did a golfed version of this, just for fun @Steffan153 can you beat it? ;)
Awsome, thanks!
Yes. 'b' * True is 'b' because the integer of True is 1. And not 0 is True because the boolean of 0 is False, and revert that is True.
'b' * True
'b'
True
not 0
0
So, this means that a (variable times True) = (variable) and that (not 0) = (True)?
That's actually pretty clever.
This is great! :D
Heh, I don't think I can get it any smaller than that in JS!
Loading collection data...
Not to mention the performance characteristics on finite lists.
O(n)
is possible, why vote anO(n log n)
solution Best Practice?haha wow, solid and suprisingly readable
i'm not french either, but it's an adapted term for admitting defeat, sure to be in the OED
ah, I'm English, not French ;p
it's French. when a fencing opponent gets you with their épée, you admit their success
touché
@Lurvetti i did a golfed version of this, just for fun
@Steffan153 can you beat it? ;)
Awsome, thanks!
Yes.
'b' * True
is'b'
because the integer ofTrue
is 1.And
not 0
isTrue
because the boolean of0
is False, and revert that is True.So, this means that a (variable times True) = (variable) and that (not 0) = (True)?
That's actually pretty clever.
This is great! :D
Heh, I don't think I can get it any smaller than that in JS!