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.
aaahhhh after three days I finally come with a solution that pass the sample tests, but times out on the other tests. I give up :)
I knew there was some way to solve this with bitwise operators.. just couldn't figure out how.
Ah nevermind. It is of course because that 74 has an uneven number of bits whereas 74 doesn't
"For n = 13, the output should be 14
13 = 1101 ~> 1110 = 14
For n = 74, the output should be 133"
74 = 01001010 ~> 10000101 = 133'
I don't understand why a zero is added in front of the binary representation of 74, but not in front of 13. Can anyone please elaborate this?
And to make it even more concise:
.map(Number) is not needed because of javascript type coercion.
in the "six && two with noise" test case. Where exactly is the noise? Or maybe I've misunderstood what noise is.
Brilliant
Approved
I mean.. if it works it works?
approved.
Approved.
approved.
approved :)
Hi,
The test cases have now been updated :)
:)
Loading more items...