Find the length of the longest substring without repeating characters.
Example 1
Input: s = "pwwkew"
Output: 3
Explanation: The maximum length is achieved on the substrings "wke" or "kew".
Output: 3
Explanation: The maximum length is achieved on the substrings "wke" or "kew".
Example 2
Input: s = "abcabcbb"
Output: 3
Explanation: The longest substring without repeats is "abc".
Output: 3
Explanation: The longest substring without repeats is "abc".
Example 3
Input: s = "bbbbb"
Output: 1
Explanation: Any substring longer than 1 contains a repeated b.
Output: 1
Explanation: Any substring longer than 1 contains a repeated b.