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.
reload
for obvious reasons ;-)I had similar problems with the example test cases provided, with an error saying "Unhashable type: list". I agree set(lists) is not the right example test case to provide. Good kata for recursive generator practice, though!
I would strongly suggest adding a test case like this:
results = [tuple(p) for p in permutations([1, 2, 2])]
expected_results = [(1, 2, 2), (2, 1, 2), (2, 2, 1)])
Test.assert_equals(sorted(expected_results), sorted(results))
And please review your reference implementation for passing this test case. It doesn't pass, neither do a lot of successful code submissions.
A good permutation generator shouldn't rely on some external code which removes duplicate occurences. In your case it's set, it's highly recommended to use sorted(...) instead of set(...), thus you will see duplicates instead of hiding them