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.
I would do that, as it takes excess processing time and memory, and that surely must be avoided to be "the best practice".
Note, this code works sometimes, but not always :)
But they can't, as 4 is the maximum score per match.
This solution is the best practice not because it takes less lines, but because it is more readable and bug-proof.
That's true, but:
"You can assume, for the purpose of this kata, that the supplied array will not be empty."