https://leetcode.com/problems/longest-substring-without-repeating-characters/#/description
Given a string, find the length of the longest substring without repeating characters.
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 a substring, "pwke"
is a subsequence and not a substring.
给定一串字符串,找出最长的没有重复字符的子串的长度。
例:
“abcabcbb
”, 答案为3(“abc”)
“pwwkew
”,答案为3(wke)
简单的答案:
public cla