You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: solution/2200-2299/2270.Number of Ways to Split Array/README_EN.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -36,7 +36,7 @@ tags:
36
36
<pre>
37
37
<strong>Input:</strong> nums = [10,4,-8,7]
38
38
<strong>Output:</strong> 2
39
-
<strong>Explanation:</strong>
39
+
<strong>Explanation:</strong>
40
40
There are three ways of splitting nums into two non-empty parts:
41
41
- Split nums at index 0. Then, the first part is [10], and its sum is 10. The second part is [4,-8,7], and its sum is 3. Since 10 >= 3, i = 0 is a valid split.
42
42
- Split nums at index 1. Then, the first part is [10,4], and its sum is 14. The second part is [-8,7], and its sum is -1. Since 14 >= -1, i = 1 is a valid split.
@@ -49,9 +49,9 @@ Thus, the number of valid splits in nums is 2.
49
49
<pre>
50
50
<strong>Input:</strong> nums = [2,3,1,0]
51
51
<strong>Output:</strong> 2
52
-
<strong>Explanation:</strong>
52
+
<strong>Explanation:</strong>
53
53
There are two valid splits in nums:
54
-
- Split nums at index 1. Then, the first part is [2,3], and its sum is 5. The second part is [1,0], and its sum is 1. Since 5 >= 1, i = 1 is a valid split.
54
+
- Split nums at index 1. Then, the first part is [2,3], and its sum is 5. The second part is [1,0], and its sum is 1. Since 5 >= 1, i = 1 is a valid split.
55
55
- Split nums at index 2. Then, the first part is [2,3,1], and its sum is 6. The second part is [0], and its sum is 0. Since 6 >= 0, i = 2 is a valid split.
0 commit comments