Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters.
Example
For example, the longest substring without repeating letters for"abcabcbb"
is"abc"
, which the length is3
.
For"bbbbb"
the longest substring is"b"
, with the length of1
.
Note
最大没有重复字符的滑动窗口,没出现过就一直右边界增加,左边移动的时候再把出现的置回0
Code
Last updated