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.
@ben-hatcher, excellent explaination. Now I understand this much better.
This is the best I've seen so far. Very clever!
Brilliant explanation, ben-hatcher. I did it davpaez's way, which appears to be faster asymptotically judging by the above discussion, but keeping memory in mind is in top form.
Yes! Exactly what I was about to point out :)
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Excelent explanation. Thank you so much!
it's a generator expression. Instead of creating a list of all elements it creates an iterable object that returns a single element at a time, which sum() can still operate on. You could also add square brackets and it should still work (because both lists and generator objects are iterable) but will use more memory.
This comment is hidden because it contains spoiler information about the solution