Check if the substring contains only a single distinct character
if isUnique ( sub ) : NEW_LINE INDENT mx = max ( mx , a [ len ( sub ) - 1 ] + maxScore ( s [ : i ] + s [ j + 1 : ] , a ) ) NEW_LINE DEDENT