Back to DSA sheet
3Sum
MediumTwo PointersReturn all unique triplets in the array that sum to zero. The solution set must not contain duplicate triplets.
Constraints
- 3 <= nums.length <= 3000
- -10^5 <= nums[i] <= 10^5
Sheets
Blind 75Grind 75Love Babbar 450NeetCode 150NeetCode 250Striver A2Z
3sum.cpp
Loading editor
Custom input (stdin)
Output
Run your code to see its output.