Back to Question

3Sum

Question Explain

Given an integer array `nums`, return all the triplets `[nums[i], nums[j], nums[k]]` such that $i \neq j$, $i \neq k$, and $j \neq k$, and `nums[i] + nums[j] + nums[k] == 0`.

Start Trying This Question Simulation

Click "Start Speaking" and answer the question naturally.