I need algorithm for this problem:
For given two strings of length m and n respectively, find maximum substring of both strings (maximal length), where character place in substring is not important.
string 1 = abcde
string 2 = ercdbth
resulting string = bcd since it is contained in both strings (aBCDe, erCDBth - uppercase letters show resulting substring).
I would prefer algorithm that makes use of graph theory.