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.
This comment is hidden because it contains spoiler information about the solution
can you explain your solution please?
Yep, there was nothing about returning in requirements. So even shorter is possible :)
retern is not need there
Did it similar) Nice. I heard bit operations is faster)
nice!
Not best practice, since it overwrites a built-in.
The kata is written with the variabler
lst
so this isn't an issue of the kata.I think the question is a bit misworded. The question should say we are to find the number of subsets from a set, not subsets from a list. If it's the first case, then by definition all elements should be unique.
Yup, these should be grouped together.
2^n is correct if you assume unique elements in the list.
I tried 2**(len(set(lst))) as the answer and it didn't like it in the test cases,
so they are assuming each item is unique.
Also faster in testing. :)
Simplicity FTW :)
You guys.. LOL. This solution.
Same solution as the one at the top
Good to hear that :)
Loading more items...