Two Sum & Beyond — 21 Solved Problems (Java)
A solved problem set built around the Two Sum family and the patterns it teaches — two pointers, prefix sums with hashing, and pair-counting — across 21 LeetCode problems from easy to hard, including 3Sum, 4Sum, Subarray Sum Equals K, Max Number of K-Sum Pairs, and Number of Excellent Pairs. Every problem gets a plain-English approach, working Java solution code, and its time/space complexity, with high-frequency interview patterns flagged so you know what to master first.
Two Sum gets treated as a beginner problem, but the pattern underneath it — hashing for O(n) lookups — is what actually unlocks 3Sum, 4Sum, and the harder variants. I picked these 21 specifically because they build on each other instead of being 21 unrelated problems, which is how most LeetCode lists get put together. If you can solve Two Sum but freeze on 3Sum, this is built for exactly that gap.