Given a string s, find the length of the longest substring without repeating characters.
This is a variable-size sliding window problem. Expand the right boundary. When a duplicate is found, shrink the left boundary until the duplicate is removed.
Use a set to track characters in the current window. Time: O(n), Space: O(min(n, alphabet)).
length_of_longest_substring('abcabcbb')
3
length_of_longest_substring('bbbbb')
1
length_of_longest_substring('pwwkew')
3