If the current suffix is at n - 1 , then we dont have next substring to consider . So lcp is not defined for this substring , we put zero .
if ( invSuff [ i ] == n - 1 ) : NEW_LINE INDENT k = 0 NEW_LINE continue NEW_LINE DEDENT