The goal is to find the count of all options where A[i] + B[j] + C[k] + D[l] = 0 We can now change this to: A[i] + B[j] = - C[k] - D[l] Which equals: A[i] + B[j] = -( C[k] + D[l] ) or: - (A[i] + B[j]) = C[k] + D[l] Now we need to compute all possible sums of A,B and C,D and count equals. @param
(int[] A, int[] B, int[] C, int[] D)