Condition to check if the current character is the first character of the string T then increment the overlapping count
if ( index == 0 ) : NEW_LINE INDENT overlap += 1 NEW_LINE if ( overlap >= 2 ) : NEW_LINE INDENT max_overlap = max ( overlap , max_overlap ) NEW_LINE DEDENT count [ index ] += 1 NEW_LINE DEDENT else : NEW_LINE