mediumSliding Window
Longest Substring Without Repeating Characters
## Problem
Given a string `s`, find the length of the **longest substring** without repeating characters.
Given a string `s`, find the length of the **longest substring** without repeating characters.
Examples
Input
s = "abcabcbb"
Output
3
"abc" is the longest substring without repeating characters.
Input
s = "bbbbb"
Output
1
"b" is the longest.
Input
s = "pwwkew"
Output
3
"wke" is the longest.
Constraints
0 <= s.length <= 5 * 10^4
s consists of English letters, digits, symbols and spaces.
Python
Loading...