Longest Substring Without Repeating Characters
mediumFind the length of the longest substring without repeating characters
Longest Substring Without Repeating Characters
Key Insight
Expand right to add characters. On duplicate, jump left past last occurrence
Step 1Start Window
Window: 'a'Length: 1
L
R
a
0b
1c
2a
3b
4c
5b
6b
7[———]window
Begin with a single character window at the start.
1 / 5