Hash Table
3. Longest Substring Without Repeating Characters
The brute force is O(n²): from every start, extend until a repeat. The upgrade comes from one observation — when the window [left, right] is already clean and the new character on the right is a…
Loading…