arr =  * n
tfu na teba pendos
Can anyone help explain what's going on here in this code? It's so simple but I don't understand what is happening within the curly braces and why arr.max is being called.
you're kidding me.
edit: this is beautiful btw.
The semantic of undefined in JS means nothing is even passed (judging from how it usually appears and how it interacts with other language features). null in typed language (especially OOP languages) usually means bottom. So it really depends on what this input validation is even supposed to mean. Is the input not provided, or is it a bottom that is created by the caller's code?
Also, empty string results in empty array is the natural behaviour, I'm not sure why it's mentioned in the first place.
What is the sense of passing null instead of an empty string? If anything, the function should be called as playerManager(), which would more or less pass undefined, not null.
Very nice! I'll get it published.
Thanks for your contribution!
Added random tests in Ruby. Increased number of tests in Python and also improved the random generator.
Oh thank you! Yeah I'd be happy for the help :)
I'll try adding random tests myself if you don't mind.