Skip to main content
HS
HiSETSuccess
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

Sliding Window: Longest Unique Substring

Grow the window on the right, shrink it on the left the moment a character repeats.

O(n) time · O(k) space

Up to 16 letters or digits, no spaces.

Presets
a
0
b
1
c
2
a
3
b
4
c
5
b
6
b
7

1/25Find the longest run of "abcabcbb" with no repeated character. The window starts empty.

Keyboard: ← → step · Space play/pause