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.
fixed here
lol
Same :D
Works every time
clean code at its best
the best
haha
How is this voted for "best practices"? It's a short but hardly readable exercise in vanity.
lol
explain what?
why? can someone explain this?
Thank you for the test!
its a good idea
Oh, I was just playing with tests, you can choose different ranges. I just wanted to have consistent results, that's why I limited the value to 10 or 11.
Using sets helps for merging in this case, yes, but also checking if an element is included in a set is O(1), while checking if an element is included in a list is O(n).
You can read here more about time complexities in python (that's how I learned as well at the beginning): https://wiki.python.org/moin/TimeComplexity
Thanks for this, pretty helpful - the logic of using sets seems pretty convienient - I'm assuming this is just to make the merging logic much nicer by allowing us to use a union, but correct me if there are other benefits to this. Only thing is it doesn't seem substantially faster to run, is just changing the length of the grid that can be generated as an input to a more limited range fine (I'm assuming so since this isn't a performance Kata)? Or should I use a different internal solution to allow for larger grids to be used?
Loading more items...