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.
I think this should be the most highly related solution. Readable and efficient use of a set
Agree with above. The average time complexity of determining if something is in a set is constant which brings the overall time complexity to O(a + b) instead of O(ab)
Nice solution!
Love to see that my exact solution is the top voted one :)
No offense, but if I saw this in a PR, I'd immediately reject lol
This comment is hidden because it contains spoiler information about the solution
I think this conditional is taking advantage of the fact that an empty array is "falsy" in python which is why this works :)