Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd215a49

Browse files
refactor 1013
1 parentefbcf8a commitd215a49

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

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

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,5 @@
11
packagecom.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
publicclass_1013 {
294
publicstaticclassSolution1 {
305
publicbooleancanThreePartsEqualSum(int[]A) {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp