leetcode
leetcode copied to clipboard
Update: 0015-3sum.go
- File(s) Modified: 0015-3sum.go
- Language(s) Used: go
- Submission URL: https://leetcode.com/problems/3sum/submissions/951426548/
This solution correctly handles the skipping of duplicates for all three numbers in the triplet (not just the first and third). This is crucial because if duplicates for the second number aren't handled correctly, some valid unique triplets might get missed, or some duplicate triplets might get included in the output.