I have strings s1 and s2 of size 100000.
The front part of s2 is the same as [0~n] to [s1.Lenght - 1] of s1.
I want to find the overlapping part of s1 in s2 and remove it.
example 1)
str1 = "abcdefgh"
str2 = "cdefghijklmno";
i want: ijklmno
example 2)
str1 = "abcdefgh"
str2 = "efghijklmno";
i want: ijklmno
example 2)
str1 = "aaabbb"
str2 = "abbbfffxx"
i want: fffxx
The length of the string is always over 100000 and it takes too long to compare them one by one because it has to be done in real time.
Do you have any good solution?