The question is: given the string such as 'abcabcbb', 'bbbbb', 'abbcbba', what is the max length of non-repeated sub-string? For example, for 'abcabcbb', the answer is the length of 'abc' or 'bca' or 'cab', they all have length 3; for 'bbbbb', it only has length 1; for 'abbcbba', its length is 2.
No comments:
Post a Comment