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.
Quite interesting kata.
python new test framework + random tests are required. updated in this fork
added in latest fork
Approved
python new test framework + random tests are required. updated in this fork
Use spoiler flag next time, please.
This comment is hidden because it contains spoiler information about the solution
thanks man, this just opened my mind to a few other solutions :D
This is my first problem and I am already surprised by the clever solutions out there :)
The operand preceding the ternary conditional operator (?) should be a boolean expression.
In this solution the program evaluates the return value of (a % 2), which should be either 1 or 0, and implicitly converts this value to the boolean data type.
Any value not equal to zero is converted into (true), and a value equal to zero is converted into (false).
how come there's no need for a comparison between the modulus statement and its answer for it to work?
We need tests with numbers exceeding the first array.
Scala translation
C Translation (author inactive).
Loading more items...