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
It doesn't seem to check the correctness of ranks at all, only their presence. I had everyone at rank 1 initially, and the tests passed.
Very good point about the entropy, the two bits cannot be 1 at the same time, I missed that entirely at the time of writing the original comment for some reason :^)
Much more concise than mine by far, but I am kind of iffy with hardcoding it to work strictly on lists. Pass it a pair of tuples or dicts and it'll spaz out even if the nesting is perfectly identical.
I'm being kind of pedantic since the kata did ask for an array-based solution, but I am biased towards maintainability.
Thanks for taking the time to answer - you've got a good point, I didn't consider that. The difference is going to be well worth the import.
Not THAT weird - the predefined function returns, in binary, 10 or 01. Effectively two random bit generators hooked to two bits of memory.
With bitwise operations, you can generate all possible valid results (plus 00) without ever exceeding 2 bits of memory vs 16 required by this algorithm.
Is there any particular reason to use Counter over string.count() here?