
intermediate
10 min read
Longest Substring Without Repeating Characters
A repeated character is not a reason to restart the scan. It is a reason to move the left boundary to the first position that makes the current window…
View solutionMaintain a moving range to solve contiguous subarray and substring problems efficiently.
Problems
Practice problems that share this primary solution pattern and compare the clues that reveal it.

A repeated character is not a reason to restart the scan. It is a reason to move the left boundary to the first position that makes the current window…
View solution
Equal-width tokens turn a permutation problem into a finite set of aligned frequency windows.
View solution
The hard part is not moving two pointers. It is preserving the target’s multiplicity while the window changes.
View solution