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.
I'm looking at the Javascript version, and It's testing with inputs greater than the maximum and expecting a correct answer.
I just ran it again, and I got:
"Testing for position number 6,142,530,078,069".
The descriptions says the max is 1,000,000,000
It comes from the randExp used to create a random position in the test case, which can be between 1 and 10^14:
Maybe I misunderstood, but the description says there will be a maximum input of 1000000000. That didn't seem to be the case.
Also, not that it's necessary, but there were no tests around error handling (e.g. negative numbers).
I'll add something to the description to more explicitly explain the combinations that work, but it's any time a continuous set of three contains one red and two blues. The BBRG test you're talking about is Brown Brown Red Green, which should have zero candidates.
This was test case #2, and was intended to test this scenario:
Test.assertEquals(friendFind(['blue','red','blue','blue','red','blue','red']),2);
I see now that it also fits with 2 before or after, and you never need to check surrounding. I'll fix that
Boo...