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.
Oh, you right about redundancy, i dont get it. I've seen your solution, can you explain how it works? I mean cnt variable and defining keys as a function
The boolean multiplication
(c in b)*
is redundant here, as - I have already commented this on another solution:b.find(c)
will return -1 if c is not in b, thus1 + b.find(c)
equals 0, not adding to the total sum.I wouldn't say it is beautiful nor excellent.
This comment is hidden because it contains spoiler information about the solution
beautiful use of boolean type, excelent solution
This solution works only for python 2. In python 2 when int number divides another int we get int rounded down number. In python 3 we would see float type number.
For example:
3/2=1 - round down and integer type (python 2)
3/2=1.5 - float (python 3)
Also, for making a float number in python 2 you need add a dot at the end of the code (ex. 3/2.=1.5)
Shouldn't it be [7,3]?
i've got only one error in 'ten millions numbers in middle pair' test . what can be wrong?
I don't understand what does this mean? at least, is this feedback wrong?
I solved this kata and submitted final solution, but after this i see "Solutions have been withheld". What's wrong?
How does it work?