-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3Sum #6
Labels
hacktoberfest
hacktoberfest contributions
Comments
Hi @iamdestinychild, Can you please assign this to me. I would like to contribute under Hacktoberfest. |
hey @iamdestinychild can you assign this to me under hacktober fest |
Merged
Sir @iamdestinychild I have solved this issue kindly assign me this isue |
sir @iamdestinychild kindly review and merge sir it will motivate me a lot |
iamdestinychild
added a commit
that referenced
this issue
Oct 3, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
Given an integer array nums, return all the triplets [nums[i], nums[j], nums[k]] such that i != j, i != k, and j != k, and nums[i] + nums[j] + nums[k] == 0.
Notice that the solution set must not contain duplicate triplets.
Example 1:
Input: nums = [-1,0,1,2,-1,-4]
Output: [[-1,-1,2],[-1,0,1]]
Explanation:
nums[0] + nums[1] + nums[2] = (-1) + 0 + 1 = 0.
nums[1] + nums[2] + nums[4] = 0 + 1 + (-1) = 0.
nums[0] + nums[3] + nums[4] = (-1) + 2 + (-1) = 0.
The distinct triplets are [-1,0,1] and [-1,-1,2].
Notice that the order of the output and the order of the triplets does not matter.
DSA Problem
Link: 3Sum
The text was updated successfully, but these errors were encountered: