Concept Flow - Three Sum Problem All Unique Triplets
Sort the array
For each element i
Set left = i+1, right = end
While left < right
Sum == 0?
Add triplet
Skip duplicates
Move left and right pointers
Repeat until left >= right
Repeat for next i
Return all unique triplets
Sort the array, then for each element use two pointers to find pairs that sum to zero with it, skipping duplicates to get unique triplets.
