Skip to content

Commit d8b16eb

Browse files
refactor 548
1 parent 8f0c764 commit d8b16eb

File tree

1 file changed

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

1 file changed

+0
-22
lines changed

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

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,6 @@
33
import java.util.HashSet;
44
import java.util.Set;
55

6-
/**
7-
* 548. Split Array with Equal Sum
8-
*
9-
* Given an array with n integers, you need to find if there are triplets (i, j, k) which satisfies following conditions:
10-
* 0 < i, i + 1 < j, j + 1 < k < n - 1
11-
* Sum of subarrays (0, i - 1), (i + 1, j - 1), (j + 1, k - 1) and (k + 1, n - 1) should be equal.
12-
* where we define that subarray (L, R) represents a slice of the original array starting from the element indexed L to the element indexed R.
13-
14-
Example:
15-
Input: [1,2,1,2,1,2,1]
16-
Output: True
17-
Explanation:
18-
i = 1, j = 3, k = 5.
19-
sum(0, i - 1) = sum(0, 0) = 1
20-
sum(i + 1, j - 1) = sum(2, 2) = 1
21-
sum(j + 1, k - 1) = sum(4, 4) = 1
22-
sum(k + 1, n - 1) = sum(6, 6) = 1
23-
24-
Note:
25-
1 <= n <= 2000.
26-
Elements in the given array will be in range [-1,000,000, 1,000,000].
27-
*/
286
public class _548 {
297

308
public static class Solution1 {

0 commit comments

Comments
 (0)