Back to Questions

3Sum

28.9K viewsAsked at Airbnb
Medium

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

Practice answering orally or with text to get instant AI feedback.

Practice with This Question