give string s return length long substre equal character exclude character if substre return 1A substre contiguous sequence character string example 1input s aaoutput 0explanation the optimal substring substre asExample 2input s abcaoutput 2explanation the optimal substring bcExample 3input s cbzxyoutput 1explanation there character appear twice s Constraints1 slength 300s contain lowercase english letter