Two Sum was about finding a pair. 3Sum asks for ALL triplets that sum to zero. Seems like a natural extension — but there is a trap hiding in the word “all.”
Try it yourself. Tap three numbers to form a triplet, and see what happens when the same values keep coming back from different places in the array.
Given -2-10012, find all triplets that sum to 0. Tap three cells to check a triplet.