Condition to check if the current character is the first character of the String T then increment the overlapping count
if ( index == 0 ) { overlap ++ ; if ( overlap >= 2 ) { max_overlap = Math . Max ( overlap , max_overlap ) ; } count [ index ] ++ ; } else {