最长不重复子字符串问题(动态规划)

问题Given a string, find the length of the longest substring without repeating characters.ExamplesGiven "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 a substring, "pwke" is a subsequenceand not a substring.分析首先,这种题肯定不能暴力来解决,否则肯定会超时。所以,考虑用一个哈希表(Map&l... Read More