DEV Community

StriKing_sHadOws
StriKing_sHadOws

Posted on

3 Sum Problem

**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.

The way to solve this problem is given in following repository link below:

I have only discussed bruteforce and better approach**

click it to preview code

Thanks

Top comments (0)