There are 1 million lines of equal length (short line). for instance
ABCDEFGHI
fghixyzyz
ghiabcabc
zyzdddxfg
. ,.
I want to find a pair of matching two lines. Overlapping A "abcdefghi" and B "fghixyzyz" "fghi", which is the maximum suffix of A, the maximum prefix of B, satisfies the suffix, and the prefix is equal.
Is there an efficient algorithm that can find the overlap of any two lines in a set?
source
share