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.
You are thinking as of [row][column] and the solution is [column][row]
Thanks. I will try different approachs.
There are ~450 tests.
My code passed 279 tests and timed out at 1 test (may be the n = 2**42 test). @G_kuldeep, can you help?
Oh yes...😎
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
Managed to pass all tests except the last one wich exceeds time.
My solution creates the array and then it searches the array in O(n) but creating the array is a O(n^2).
I've seen the other discussions and you gave a hint to check "one step ahead", that the algorithm has to be O(log(n)) and that there can't be a data structure big enough to hold the seq[n] info.
I'm thinking maybe there is no need to create any data structure at all?
Maybe its a recursion of very few steps?
Can you shine a bit of light on me? Thanks, great problem, it's kept me thinking on it these last days