Skip to content
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

Closed
iamdestinychild opened this issue Oct 2, 2023 · 4 comments
Closed

3Sum #6

iamdestinychild opened this issue Oct 2, 2023 · 4 comments
Assignees
Labels
hacktoberfest hacktoberfest contributions

Comments

@iamdestinychild
Copy link
Owner

iamdestinychild commented Oct 2, 2023

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

@iamdestinychild iamdestinychild added the hacktoberfest hacktoberfest contributions label Oct 2, 2023
@SmashSidak-1508
Copy link

Hi @iamdestinychild, Can you please assign this to me. I would like to contribute under Hacktoberfest.

@Dhandeep10
Copy link
Contributor

hey @iamdestinychild can you assign this to me under hacktober fest

@SmashSidak-1508 SmashSidak-1508 mentioned this issue Oct 3, 2023
@SmashSidak-1508
Copy link

Sir @iamdestinychild I have solved this issue kindly assign me this isue

@SmashSidak-1508
Copy link

sir @iamdestinychild kindly review and merge sir it will motivate me a lot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest hacktoberfest contributions
Projects
None yet
Development

No branches or pull requests

3 participants