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.
python is black magic
Clever, lightning-fast, best-practice!
This is genius
I overthink things sometimes
Its a good answer
N calls to upper ;)
Why does the example on the description have the same inputs but different outputs? Am I missing somethere here?
counter is useless, a simple input of (1011, 11) breaks your solution
I jsut wanted to sumsumsum
It doesn't modify the arrays, but creates a new array.
@Unnamed, @Blind4Basics: There is a Guido's article about List Comprehensions and Generator Expressions advantages - http://python-history.blogspot.com/2010/06/from-list-comprehensions-to-generator.html
But yeah, it's more about comparison between LCs and (map with lambda). Thanks for correcting me
see the fork: no meaningful difference between the three versions (500 tests on one input of size 500x500). The 3 versions perform about the same. Sometimes one is faster than the others, but not always the same one. You'd need something far more precise to actually see any consistent difference.
@Unnamed: you don't use lambda in there, so no overhead on this side (which is often what is slowing this kind of approach, I believe).
2 Usually true.
1 Who told you that? I know Python folks don't like lambdas, but I haven't heard anything about
map. One function call is easier to read than an expression where a new variable is introduced for no reason.
The obvious solution. lol
Loading more items...