Find all unique triplets in an array that sum to zero.
Constraints
Example
>>> three_sum([-1, 0, 1, 2, -1, -4]) [[-1, -1, 2], [-1, 0, 1]] >>> three_sum([]) [] >>> three_sum([0]) [] >>> three_sum([0, 0, 0]) [[0, 0, 0]]
Recent Submissions
No submissions yet — hit Run Tests to try!
Hints