Two pointersIntro
Data structures & algorithms · lesson 3
Two numbers. No extra memory.
You already cracked two-sum with a hash set: remember what you have seen. But when the list is sorted, there is an even cleaner move that needs no memory at all. You are going to derive it.
The most reused pattern in coding interviews.
Tap Start.
Quick, honest: how does this feel right now?