cs.thefarshad
medium Two Pointers

3Sum

Return all unique triplets [a, b, c] from `nums` with a + b + c = 0. The result is sorted, and each triplet is in ascending order. Example: [-1, 0, 1, 2, -1, -4] → [[-1, -1, 2], [-1, 0, 1]].

runs in your browser