I have a complex problem at hand i.e. I have a huge(more than 200000 characters) :-
'1213 1242 1213 49 1213 12134 4561213 154816 4631 154816'
Output to be something like :-
1. No. of distinct recurrent patterns
2. Each's pattern's repitition count #=> ([12], 6), ([121], 6), ([1213], 6), ([213], 6), ((21), 6), ((13), 6), .....
There are lots of solutions on finding longest repeating string using ruby/c/c++ but very few for finding all recurring substrings.
I am looking for some conventional algorithm to perform this operation. like we have Floyd's cycle finding algo. for identifying cycles, etc. Something of that sort would be great to get started with.