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.
In a computer you have bits. They use binary (1 or 0, on or off).
By combining these, we can begin to go from 1 to much higher numbers.
it is read right to left as powers of 2.
example:
0 0 0 0 0 // is really equal to
16 8 4 2 1 // this
So when a bit is "on" or "1", it will count the code below
EX:
0 0 1 0 1 //
16 8 4 2 1
This turns on 1 and 4 this equals 5.
1 1 1 1 1
16 8 4 2 1
This has 16+8+4+2+1 which equals 31
0 1 0 0 1 //
16 8 4 2 1 //
in this case 8 is on and 1 is on, so 8+1 = 9
This should be sufficent instruction to help you pass this.
PS I realize this is old, but others may ask.
Only because of the exponent = 3
Otherwise, you could do a arr.length-1 and it would easily work for EVERY instance you could throw at it up to memory limits.
Yes officer. This code right here!