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.
Hi there!
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Bitwise_AND
This explonation was took from 'JohanWiltink'
It evaluates as (a & b) & ((a & b) - 1).
Let c = a & b, so you have c & c-1. That clears the top bit, if any, from c. If c == 0, a and b had no set bits in common. Otherwise, if c & c-1 == 0, a and b had exactly one set bit in common. In all other cases, they had at least two set bits in common, and the function should return true.
You can use c & c-1 iteratively to zero out all set bits from c. That's a faster way to count them than to count set bits over all of them.
Hi there!
I ran in on my laptop. Everything works fine.
Excellent solution. Very short but it doesn't fit with rules that go with this kata.
'In this Kata, you will be given a string and your task is to determine if that string can be a palindrome if we rotate one or more characters to the left.'
It has to be rotated to the left ;)