Skip to content

Commit d215a49

Browse files
refactor 1013
1 parent efbcf8a commit d215a49

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

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

-25
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,5 @@
11
package com.fishercoder.solutions;
22

3-
/**
4-
* 1013. Partition Array Into Three Parts With Equal Sum
5-
*
6-
* Given an array A of integers, return true if and only if we can partition the array into three non-empty parts with equal sums.
7-
* Formally, we can partition the array if we can find indexes i+1 < j with
8-
* (A[0] + A[1] + ... + A[i] == A[i+1] + A[i+2] + ... + A[j-1] == A[j] + A[j-1] + ... + A[A.length - 1])
9-
*
10-
* Example 1:
11-
* Input: [0,2,1,-6,6,-7,9,1,2,0,1]
12-
* Output: true
13-
* Explanation: 0 + 2 + 1 = -6 + 6 - 7 + 9 + 1 = 2 + 0 + 1
14-
*
15-
* Example 2:
16-
* Input: [0,2,1,-6,6,7,9,-1,2,0,1]
17-
* Output: false
18-
*
19-
* Example 3:
20-
* Input: [3,3,6,5,-2,2,5,1,-9,4]
21-
* Output: true
22-
* Explanation: 3 + 3 = 6 = 5 - 2 + 2 + 5 + 1 - 9 + 4
23-
*
24-
* Note:
25-
*
26-
* 3 <= A.length <= 50000
27-
* -10000 <= A[i] <= 10000*/
283
public class _1013 {
294
public static class Solution1 {
305
public boolean canThreePartsEqualSum(int[] A) {

0 commit comments

Comments
 (0)