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.
solid answer
Use the strict equality === otherwise it will create errors or bugs when there is a huge code base
i'll try do my best
no need for else, u can put just return "Odd"
IMHO. Code Style is not good
I belive most sane c/c++ compilers optimize any multiplication/divison by powers of two into bit shifts, which is even faster than addition
Addition runs faster than multiplication
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Just put in your code
console.log(message)
where message is text or an object of some kind.How do you do a console.log? I can't seem to figure it out
There are 4 hard-coded tests, and then 100 randomly-generated tests; are you talking about that second set? The same rules apply to all the tests, of course. So if you want, you could
console.log
out the input, and your output, and then look at the ones that don't pass and figure out what the problem is.This comment is hidden because it contains spoiler information about the solution
I ran into the same problem too with Java. I was not able to get satisfactory results by rounding. The expected values of the random tests remained off by one.