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 agree, but I also believe that a solution should only be optimised if it times out.
in this case true and false no needed
toLowerCase() returns a string with all its letters in lowercase. Use spoiler flag next time.
This comment is hidden because it contains spoiler information about the solution
Funny how this gets best practice upvotes, ugly runtime...
Note that the
in
check is super inefficient with a list (needs to check against all the elements), so this solution is O(words**2).It is better to use a set (or dict if you need values).