Longest Substring Without Repeating Characters — Interactive Visualizer

Expand the right edge, and whenever a duplicate appears, shrink the left edge until the window is valid again.