MCPcopy Create free account
hub / github.com/SHY-Corp/LeetCode-Solutions / fourSumCount

Method fourSumCount

Java/454.4SumII.java:25–60  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls 3

containsMethod · 0.80
addMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected