There are 1 million of equal length strings(short string).For example
abcdefghi
fghixyzyz
ghiabcabc
zyzdddxfg
. . .
I want to find pair-wise overlap of two string.The overlap of A"abcdefghi" and B"fghixyzyz" is "fghi",which is the maximal suffix of A , the maximal prefix of B ,satisfy the suffix and the prefix are equal.
Is there efficient algorithm which can find the overlap of any two strings in the set?