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.
Approved
cool
Good kata, thank you!
shot operator
not a kata issue
cool!
Nice kata. I really enjoyed it!
Looks like you got your answer, closing.
I came up with the exact same solution, cool!
Dude, your way is too long. Maybe you should find another way to solve this problem without changing the original array? :)
Hint: note that the ranks of adjacent knights are always different, and when Galahad comes, a same pattern happens
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?
Ruby 3.0 should be enabled, read this to learn how to do it
Please organize the structure of test fixture as following (although it has been mentioned in the attached link, I'm repeated here again)
Loading more items...