I was trying to find ALL longest common substrings between two strings
Supposing that i had computed Suffix array and LCP array correctly as SA[] and LCP[] Is my logic correct or am i missing something?
Here LCP array is between i and i-1 indexes.
Say we have two strings str=abcabc and str1=bc. I change str= str + '#' + str1.
My suffix array SA[]=[6,3,0,7,4,1,8,5,2]
And LCP array be=[0,0,3,0,2,2,0,1,1]
What can be a better algorithm to find them ?