Concept Flow - Three Sum Problem All Unique Triplets
Sort the array
Start outer loop i from 0 to n-3
Skip duplicates for i
Set left = i+1, right = end
While left < right
Calculate sum = nums[i
Add triplet
Skip duplicates left/right
left++
right--
Continue loop
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 ensure unique triplets.
