Can someone help me solve my problem?
the problem is this:
Assumptions 1: we have an undefined number of substrings (s1, s2, s3, ...) that each of these substrings is a sequence of 100 numbers (an integer from 20,000,000 to 80,000,000) that they were randomly selected. We do not have any knowledge of the numbers that make these substrings and the number of substrings. here the order of numbers in the substring is more important, rather than the relationship between them.
Assumptions 2: we have a long and long string, including millions of numbers, this long string consists of repeating the substring specified in assumption 1. The name of this string is "S" ,.
We simplify the example as shown below: Each substring contains four numbers instead of 100 numbers, and each number is from 20 to 80 instead of 20,000,000 and 80,000,000: We have the string "S", our algorithm should find the substring s1 and s2 and s3 from the string "S".
S= 71,59,32,51,45,22,53,25,66,72,71,26,32,28,45,72,59,51,53,66,59,51,53,66,59,51,53,66,22,59,51,25,72,32,26,53,28,66,45,72,71,32,45,72,71,32,45,72, ... .
The result of this algorithm is as follows:
S1= 59,51,53,66 S2= 22,25,26,28 S3= 71,32,45,72
NOTE. If we are lucky, substrings can come in the string "without" and not be repeated one after another.
I want the algorithm to find the number of substring (s1, s2, s3s, ...) And also find the substring (s1, s2, s3, ...) that will make the string "S".
Thank you very much.