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.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
In Ruby you normally don't say
return something
, you just saysomething
, since the last expression is always the return value of a method invocation.This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
It's a left-shift bit operator: x << n shifts the bits of 'x' n position to the left, doubling its value once for each shift. E.g.: 3 << 2 = 3 * 2 * 2 = 12
http://en.wikipedia.org/wiki/Bitwise_operation#Bit_shifts