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.
Sergio, this returns true when divisors x and y leave the same remainder, right?
e.g. (11 % 2) == (11 % 5) // (1 == 1) true
but 11 is divisible by neither 2 nor 5, and should return false.
Wanted to extend the idea of using default parameters. I wish I could keep the spread operator, but it must be the last, and default params are set left to right.
In case anybody misread like I did:
"sum of the integers to the left of N is equal to the sum of the integers to the right of N"
I interpreted this as sum of N from the left == sum of N from the right, and I couldn't understand why the first test failed on [1,...,1] which returns 0 (in my incorrect code).
Read carefully!
Thanks for the kata.
This comment is hidden because it contains spoiler information about the solution
Why not just return everything on the right side of the || operator? I don't understand what the comparison to !str gets you. Halp please.