Call LCP for the part between the chunks and add 2 to the result . Length of string evaluated till now is increased by ( i + 1 ) * 2
return LPCRec ( curr_str . Substring ( i + 1 , ( n - 1 - i ) - ( i + 1 ) ) , count + 2 , len + ( i + 1 ) * 2 , str ) ; } } return count + 1 ; }