Problem of the day
Input: ‘N’ = 5
'ARR' = [-1, -1, 2, 0, 1]
Output:
-1 -1 2
-1 0 1
Explanation:
(-1 -1 +2) = (-1 +0 +1) = 0.
The first line contains an integer, ‘N’, representing the number of elements in the array.
The next line contains ‘N’ space-separated integers representing the elements of the array.
Return an integer, the number of all the unique triplets with zero-sum.
1 <= N <= 1000
1 <= ARR[i] <= 1000
Time Limit: 1 sec
5
-1 -1 2 0 1
-1 -1 2
-1 0 1
(-1 -1 +2) = (-1 +0 +1) = 0.
4
0 0 0 0
0 0 0