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(1) spaceTwo Pointers: Pair Sum
Walk inward from both ends of a sorted array, discarding a whole row of pairs with every move.
L
1
03
14
26
38
4R
11
51/11Start with L at the smallest value (1) and R at the largest (11). Target is 10.
Keyboard: ← → step · Space play/pause