Interactive visualizations for data structures, algorithms, sorting, searching, trees, graphs, dynamic programming, and interview preparation
Two pointers, sliding window, prefix sum, matrix patterns
Use two pointers that move toward each other (or in the same direction) to solve problems onsorted arraysor strings in O(n) time.
sorted arrays
strings
Two Sum II — Target: 16
L=0
1+15=16 → Found!
R=6