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 suspect you were mutating your inputs, so the resilts for the comparison calculation were not the same when replacement was disabled.
An additional Python test had been added to check for mutation.
Sounds similar to the problem below?
Eeeer... Actually, I have to confess I do not see the difference between your algorythm and mine.
Or do you talk about another version ?
Try to think about a O(n log n) implementation ;-)
This comment is hidden because it contains spoiler information about the solution
No,no. I haven't do a O(n) algorithm. I just imagine
^_^
After a brief thought, I think it's hard to achieve.
@_@
hmm let me understand your hint first :')
Perhaps
two points
can solve this, have a try? ;-)@myjinxin2015
What is the best complexity you can obtain on this problem?More precisely, I can see a O(n log n) algorithm but is O(n) achievable?
Sorry, I don't know that where is unclear? Could you tell me the details? Thanks ;-)
This kata has possibly the most unclear desctiption I've seen. Could REALLY use some reworking.
I did the math longhand and it worked fine, but failed the third random case. The expected value was not the correct value based on doing the math long form.
Any idea why that might be?
problem was:
(ball_probability([['yellow', 'green', 'yellow', 'yellow', 'yellow', 'yellow', 'green', 'green', 'blue', 'green', 'green', 'blue', 'red'], ['green', 'blue'], False]))
I see you found a working solution in the meantime :-)
I am using the full character set, not using a limited method, and using random.choice to select both the type (upper, lower, or num) and the selection within that group.
Still not working.
Yes, the description says to create passwords with 6-20 chars. You are creating passwords with 8-20 chars.
Loading more items...