Example 1:
Input: s = "abcabcbb"
Output: 3
Explanation: The longest substring without repeating characters is: "abc". Its length is: 3
Example 2:
Input: s = "bbbbb"
Output: 1
Explanation: The substring: "b" is the longest substring without repeating characters.
Example 3:
Input: s = "pwwkew"
Output: 3
Explanation: The longest substring without repeating characters is: "wke". Its length is: 3
Note that: "pwke" is not a valid substring because the characters are not contiguous.