Welcome to the Python screen.
The question is on your right: Find Unique Triplets That Sum to Zero. Read through the requirements first.
Run and submit your code as often as you need. You also have five interviewer messages this session - want to talk through your approach, or are you ready to start coding?
Given an integer array nums, return all the unique triplets [nums[i], nums[j], nums[k]] such that i, j, and k are distinct indices and nums[i] + nums[j] + nums[k] == 0.
The solution must avoid duplicate triplets in the output.
def three_sum(nums):