LeetCode Prep
Algorithm Visualizer
Step through two pointers, sliding window, binary search, BFS/DFS, heaps, DP, and union-find one operation at a time.
← All visualizers
O(n) time · O(k) spaceSliding Window: Longest Unique Substring
Grow the window on the right, shrink it on the left the moment a character repeats.
a
0b
1c
2a
3b
4c
5b
6b
71/25Find the longest run of "abcabcbb" with no repeated character. The window starts empty.
Keyboard: ← → step · Space play/pause
More visualizers