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.
just look at other solutions using one additionnal line before the comprehension.
What's the O(n^2) solution ?
This comment is hidden because it contains spoiler information about the solution
Test Cases could have been more perfomance demanding
Worst practice ever, on this kata... This is O(n^3). And this is certainly not clever either for the same reason.
People should learn a bit, before upvoting this sort of code...
Bitwise is a good way to go, though one thing to keep in mind with that solution is that it only works if x isn't 0 as 0 will falsly test as true.
It's cool. I think using bitwise operator is the best solution.
Really, really cool solution, but definitely not best practices.
If the input is something else than integers, (floats, for example) this will not work.
This comment is hidden because it contains spoiler information about the solution
This is so, so clever. I need to learn to think in binary more often.
This comment is hidden because it contains spoiler information about the solution
I didn't understand what does it do. Can anyone explain to me?