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.
i can't find problem :(
This comment is hidden because it contains spoiler information about the solution
[ 2, 0, 0, 1 ] [ 2, 0, 1, 7 ]
7 is't exist at [ 2, 0, 0, 1 ].....
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
it for one_two
or
one_two_three
?
Got it. Thanks!
Hi!
one_two
function already defined in a global scope.You won't need to receive any arguments. You can just call
one_two
fromone_two_three
I see. Thank you!
I don't think that you need one_two function. The instructions are a bit misleading.
As you can see the initial code only requires the one_two_three function without passing any argument.
3rd row of test cases: "count = Counter(one_two_three() for _ in range(length))"
Hi-- This is an intriguing kata. However, as a noob to python and codewars, I'm stumped on elementary stuff: How do I access the one_two function to generate my random ints(0,1)? Furthermore, what argument(s) does function one_two_three() take?
Thanks!
That's all I found so far thanks!
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?
Loading more items...