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.
This comment is hidden because it contains spoiler information about the solution
up
same question somoene help?
If in a simple case you find that you're printing (visiting) the same element more than once, then its likely that you dont have a O(n) solution.
How about adding some print statements to debug exactly what elements and indices you're looking at for a simple case?
Took me 2 evenings to solve this one and was really hard to get my head around. Suggest searching the web for "python function closure" as your next port of call.