Two Pointers
Squeezing a sorted search space from both ends instead of brute-forcing pairs.
0 of 5 lessons complete · 108 min total
- Two Pointers: Shrinking the Search SpaceOpposite-end and same-direction pointers: why 'sorted + pair sum', 'palindrome', and 'in-place' are the giveaway signals, and the always-move-the-loser rule.Lesson · 15 minNot completed
- Pointers ConvergingWatch the search space shrink one decision at a time.Animation · 10 minNot completed
- Practice: Converging PairsBoth-end scans and the sort-then-squeeze pattern with duplicate skipping.easymedium×23 problems · 0 solvedPractice · 35 minNot completed
- Practice: Walls & WaterThe move-the-shorter-side argument and tracking running maxima from both ends.mediumhard2 problems · 0 solvedPractice · 40 minNot completed
- Two Pointers CheckpointWhen two pointers beats hashing, the greedy movement argument, and duplicate handling.Checkpoint · 8 minNot completed