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.
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
Hello, you can deepcopy the array first before giving it to the user. Or, you can run the reference solution first and then match the user solution from the run (if you're sure the reference solution doesn't modify the input as well).
That way, the user won't be able to modify the input array.