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.
This comment is hidden because it contains spoiler information about the solution
Can you explain how does this work? I have solved the kata but found your solution a lot different than the others.
That was unexpected and really clever :)
Pay attention to the unit tests, you'll figure it out.
This comment is hidden because it contains spoiler information about the solution
How is this kata ranked 7kyu? It deserves 8kyu, no doubt.
1 more year, still not fixed.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
You can call remove(i) twice instead. Also, your i doesn't have to go back to the start, it only needs to go back 1 position, for N W E S cases.
At first, it looked complicated. Then noticed it's only 7 kyu and had to be simpler than that. I'm glad I've used my brain before coding.
Consider using IntStream and you won't need the getAsInt call.
Have you tried it on paper for a couple of inputs? The pattern is obvious after a few iterations.
This no longer pass all tests, as there is a test for very large product. This was my initial attempt as well.
This is the best solution! Why? Because it's risky, just like a jewels thief work. Whilst it's not even close to a best practice solution, you earned my 'Clever' vote :D
Loading more items...