LongestSubstringWithoutRepeatingCharacters
Updated:
题目:
求一个字符串中最长的不含重复字符的子串。(注意:子串是连续的,子序列不是连续的)
思路:
记录当前字符串的最近一次出现的位置,然后更新符合题目的最长的子串长度
1 | public class LongestSubstringWithoutRepeatingCharacters { |
Updated:
求一个字符串中最长的不含重复字符的子串。(注意:子串是连续的,子序列不是连续的)
记录当前字符串的最近一次出现的位置,然后更新符合题目的最长的子串长度
1 | public class LongestSubstringWithoutRepeatingCharacters { |