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, this is a non-issue because x{i} = f(x{i - 1}).
In your case, since [1, 2] is part of the sequence, we know that f(1) = 2. In the latter part, though, you have [1, 3], or f(1) = 3. This is impossible.
But that sequence isn't allowed, because one of the assumptions we've made is that if we're working with an application, and if a single value repeats, the whole sequence does. In your example, we have ,2,3, and ,2,1, which contradicts this.
This is pretty neat and probably passed all the test cases but it doesn't actually work in general. For example, [1,2,3,4,2,1,3,4].