If matching is found
else if ( A . charAt ( i - 1 ) == B . charAt ( j - 1 ) ) { LCSuff [ i ] [ j ] = LCSuff [ i - 1 ] [ j - 1 ] + 1 ; if ( LCSuff [ i ] [ j ] > result ) { result = LCSuff [ i ] [ j ] ; } }