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.
3 years and no news from OP, closing.
@coreyoconnor please use spoiler flag next time.
This comment is hidden because it contains spoiler information about the solution
yeah, I know, but I came from C#, where it is must have, so it's just a habit
no need for return and ;
This comment is hidden because it contains spoiler information about the solution
its a bitwise comparison
how it works ?
This comment is hidden because it contains spoiler information about the solution
what's mean , Double rotation. I can't image what n is in this test
mmm, weird... Can you post your code (with appropriate markdown and spoiler flag)?
I don't know why my test didn't past. I reade on stack that i need different tests because this check equals of objects and this objects are different.
java.lang.AssertionError: Should parse water: H2O expected: java.util.HashMap<{H=2, O=1}> but was: java.util.HashMap<{H=2, O=1}>
Expected :java.util.HashMap<{H=2, O=1}>
Actual :java.util.HashMap<{H=2, O=1}>
Im a little confused as too what your asking. If n is greater than the sum of its digits raised to the (p + i) power, then the final step of (sum % n) will never return 0, causing the method to return -1.
how you check whether n is bigger of sum