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.
Nice that you don't keep a reference to List<I> collection in the constructor, only the size of the collection. You don't need the collection itself, only the size (unless you do it the way barrysweeny did
https://www.codewars.com/kata/reviews/549682b0f025f497750000a8/groups/5e90303edf143800016b578f)
The naive approach is to make your md5Hash function return a 32 character string, and compare it to the hash that was sent to the function.
Strings are slow. Try to compare byte buffers or arrays.
Not bad
It's worse than that--the problem statement implies that m will be nonzero: "Your task is to return to the function seven(m) (m integer >= 0)"
This comment is hidden because it contains spoiler information about the solution
I like this solution best, because it works when n and m are negative (although the problem statement claims the inputs will never be negative).
Not true. If n or m are 0, first if will be true, and return 0
One thing that is not made clear in the instructions: The final number might be negative
If you start with 109, then the next number in the sequence is 10 - 2*9 = -8
assertArrayEquals(new long[] {-8, 1}, DivSeven.seven(109));