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.
That's a very cool answer, I have never used Math.sign before.
Very clever!
This comment is hidden because it contains spoiler information about the solution
bruh
This is a good solution, but not universal :( To fix it, you need to use System.lineSeparator() or System.getProperty("line.separator")
Good luck in your studies! =)
It actually does not matter what you assign there. It is overriden in the tests anyway
This algorithm is not best practices - albeit short, having to run the counter once every duplicate value results in the algorithm being O(n^2). Using counters would have been a much better solution, which only has a complexity of O(n).
short but for optimized - u have way too many iterations calling count and set/sum
Clever one.. Awesome!!
This comment is hidden because it contains spoiler information about the solution
how did you came for this?!?
same here
This comment is hidden because it contains spoiler information about the solution
In python any number that is different from 0 is considered True (inclusive negatives)
Wouldn't think that my solution would be same as most of the people. The only thing different I did I wrapped a==b with int - for cleaner output. Cause I know that 1 == True on current test comparison
Loading more items...