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.
Right, I had a mistake in my code. Using an O(N) lookup for the characters is easy but inefficient; my O(1) attempt was incorrect because the alphabet is not necessarily ordered. However, you can write the code to have O(1) search if you're careful and take unicode into account.
This comment is hidden because it contains spoiler information about the solution
This is really difficult to do with Python because of the unicode test case. My code works on all other test cases.
Any tips for solving this in Python when not-ASCII unicode strings are used?