Finding a digit in a sequence
How can i get the n-th digit from a sequence :
112123123412345123456123456712345678123456789123456789101234567891011...
So if I give input : 5 The output shoul be : 2
And the problem is the length of the sequence can reach up to 2147483650.
If using greedy algorithm it should takes lot of time. Anyone know how to
solve it with fast algorithm?
No comments:
Post a Comment