Skip to main content
3Sum | AlgoCracked
AlgoCracked
Problems3Sum
Medium33.0% acceptance
Blind75ArrayTwo PointersSorting

3Sum

Given an integer array nums , return all distinct triplets [a, b, c] such that a + b + c = 0 . Each triplet must be sorted ascending , and the list of triplets may be in any order. No triplet may repeat. Input format Input is [nums] , e.g. [[-1,0,1,2,-1,-4]] .

Loading workspace…