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.
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
1 <= N <= 1000
1 <= ARR[i] <= 1000
Time Limit: 1 sec