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 went for similar approach, but just build pattern in function itself (e.g. just loop until you get a repeat digit). That way you avoid any hard coding of the rules.
Love this solution! A lot cleaner than the for loop imo
This comment is hidden because it contains spoiler information about the solution
Very clever solution, however efficiency wise not really the best.
You end up going through the full list twice as well as doing two index calls.
Very similar to my solution, however I think some small changes to make this work on Python 3x is //= instead of /=.
Also this would not work for negative numbers.