File tree 1 file changed +0
-31
lines changed
src/main/java/com/fishercoder/solutions
1 file changed +0
-31
lines changed Original file line number Diff line number Diff line change 3
3
import java .util .HashMap ;
4
4
import java .util .Map ;
5
5
6
- /**
7
- * 659. Split Array into Consecutive Subsequences
8
- *
9
- * You are given an integer array sorted in ascending order (may contain duplicates),
10
- * you need to split them into several subsequences,
11
- * where each subsequences consist of at least 3 consecutive integers. Return whether you can make such a split.
12
-
13
- Example 1:
14
- Input: [1,2,3,3,4,5]
15
- Output: True
16
- Explanation:
17
- You can split them into two consecutive subsequences :
18
- 1, 2, 3
19
- 3, 4, 5
20
-
21
- Example 2:
22
- Input: [1,2,3,3,4,4,5,5]
23
- Output: True
24
- Explanation:
25
- You can split them into two consecutive subsequences :
26
- 1, 2, 3, 4, 5
27
- 3, 4, 5
28
-
29
- Example 3:
30
- Input: [1,2,3,4,4,5]
31
- Output: False
32
-
33
- Note:
34
- The length of the input is in range of [1, 10000]
35
- */
36
-
37
6
public class _659 {
38
7
39
8
public static class Solution1 {
You can’t perform that action at this time.
0 commit comments