Examples:
Given"abcabcbb", the answer is"abc", which the length is 3.
Given"bbbbb", the answer is"b", with the length of 1.
Given"pwwkew", the answer is"wke", with the length of 3. Note that the answer must be asubstring,"pwke"is asubsequenceand not a substring.
非常typical 的題目,但是用暴力解法會超時(for pyhton only tough....damn python....)
暴力解法:
從第一個開始眷茁,check ?這個字母是否出現(xiàn)在重復炕泳,沒有的話counter+=1,else全部歸零上祈,把counter和上個最大值進行對比保留最大培遵,java或者c應該就不會超時,python登刺。籽腕。。纸俭。u know,...
-