Skip to content

Commit b365302

Browse files
refactor 454
1 parent 7eef84e commit b365302

File tree

1 file changed

+0
-24
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+0
-24
lines changed

src/main/java/com/fishercoder/solutions/_454.java

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,30 +3,6 @@
33
import java.util.HashMap;
44
import java.util.Map;
55

6-
/**
7-
* 454. 4Sum II
8-
*
9-
* Given four lists A, B, C, D of integer values,
10-
* compute how many tuples (i, j, k, l) there are such that A[i] + B[j] + C[k] + D[l] is zero.
11-
* To make problem a bit easier, all A, B, C, D have same length of N where 0 ≤ N ≤ 500.
12-
* All integers are in the range of -228 to 228 - 1 and the result is guaranteed to be at most 231 - 1.
13-
14-
Example:
15-
16-
Input:
17-
A = [ 1, 2]
18-
B = [-2,-1]
19-
C = [-1, 2]
20-
D = [ 0, 2]
21-
22-
Output:
23-
2
24-
25-
Explanation:
26-
The two tuples are:
27-
1. (0, 0, 0, 1) -> A[0] + B[0] + C[0] + D[1] = 1 + (-2) + (-1) + 2 = 0
28-
2. (1, 1, 0, 0) -> A[1] + B[1] + C[0] + D[0] = 2 + (-1) + (-1) + 0 = 0*/
29-
306
public class _454 {
317

328
public static class Solution1 {

0 commit comments

Comments
 (0)