3. Longest Substring Without Repeating Characters
Solutions
Sliding Window
- Keep pointer
startandcurr, a set ofoccurredcharacters - If
s[curr]has occurred, movestartto next and updateoccurreduntils[curr]is not insideoccurred - Keep the largest
curr - start + 1as the result