leetcode icon indicating copy to clipboard operation
leetcode copied to clipboard

Update: 0015-3sum.go

Open StormbornYB opened this issue 2 years ago • 0 comments

  • 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.

StormbornYB avatar May 16 '23 13:05 StormbornYB