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 is 4kyu problem and it supposed to be hard;p
I saw your solution and it is literally creating all sequence elements all the way upto
n
which is not intended at all (by time complexity and storage too).This problem requires some data structure and algorithm (which is not hard in this problem) and can be solved in few lines (in python atleast).
I can assure there is no math involved;
This can;t be solved using recursion because it is an infinite fractal;p