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.
@txhawg, n is not the divisor there, so, there is no division by 0 either. 0 is an even number.
@mnafrps - % is the remainder operand, which performs division. Division by zero is undefined, thus my question. Also the question of is 0 even or odd or neither, since it has no value?
console.info(0%2 == 2); // outputs false
Yes. 0 times any number equals 0, so even if 0 % 2 = 2 (which yields "true") and that would mistakenly make 0 an odd number, it doesn't matter because 9 * 0 = 0 and 8 * 0 = 0. The result is the same.
Will this work if n is zero?
Please use spoiler flag next time.
This comment is hidden because it contains spoiler information about the solution
For C: horrible description that does not match the C function prototype; there is no binary grid.
Easy to solve :D
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Retired.
amazing !!
smart!!!
Because there is an inital value passed to the reduce function, a will be 0 and b will be the first element of the array
Loading more items...