Next → to start.R walks forward through every character exactly once. When adding the next character would create a duplicate, L shrinks from the left — removing characters until the duplicate is gone. Then add the new character.
Each character is visited at most twice — once by R (when added), once by L (when removed). That's O(n) time. Both pointers move FORWARD; they never converge.
This is what makes sliding window distinct from converging two-pointer — sliding window is for "longest/shortest contiguous range with some property," converging is for "find a pair in a sorted array."