Longest Substring Without Repeating Characters
MediumLeetCodeSliding Window
Approach hintTry it first, then revealHide
Keep a window with no repeated characters; when the incoming character already occurs inside it, move the left end just past that occurrence, tracked in a last-seen array.