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 is JavaScript, and indeed,
7
is not in[2,0,0,1]
.This is by design. There is no issue. ( It's a feature, not a bug :)
I'm not sure which part this belongs to. Could you please specify the test case in which this occurs and the language you're using? I will then do my best to fix any existing issues. (Also note that the JavaScript version is fairly new.)
Try it yourself:
I should exdend test cases.
It valid for any random function with uniform distribution that return three elements.
For example
P(11) ≈ P(12) ≈ P(13) ≈ P(21) ≈ P(22) ≈ P(23) ≈ P(31) ≈ P(32) ≈ P(33) ≈ (1 / 3)**2 ≈ 0.11111111111
Same for strings with length 3, 4 and so on
Do you passed test with consecutive 1's 2's 3's?
Try to generate 60k length string and measure probability to find same length combinations, will it equal expected probability?