Longest Common Prefixes
Suppose I constructed a suffix array, i.e. an array of integers giving the starting positions of all suffixes of a string in lexicographical order. Example: For a string str=abcabbca , the suffix array is: suffixArray[] = [7 3 0 4 5 1 6 2] Explanation: i Suffix LCP of str and str[i..] Length of LCP 7 a a 1 3 abbca ab 2 0 abcabbca abcabbca 8 4 bbca empty string 0 5 bca empty string 0 1 bcabbca empty string 0 6 ca empty string 0 2 cabbca empty string 0 Now with this suffixArray constructed, I want to find the length of the Longest Common Prefix (LCP) between str (the string itself) and each of