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 [ i + 1 : n - 1 - i ] , count + 2 , leng + ( i + 1 ) * 2 , s ) NEW_LINE return count + 1 NEW_LINE