We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3f43742 commit b27e18eCopy full SHA for b27e18e
src/test/java/g3601_3700/s3659_partition_array_into_k_distinct_groups/SolutionTest.java
@@ -20,4 +20,34 @@ void partitionArray2() {
20
void partitionArray3() {
21
assertThat(new Solution().partitionArray(new int[] {1, 5, 2, 3}, 3), equalTo(false));
22
}
23
+
24
+ @Test
25
+ void partitionArray4() {
26
+ int[] nums = {1, 2, 3, 4, 5};
27
+ assertThat(new Solution().partitionArray(nums, 2), equalTo(false));
28
+ }
29
30
31
+ void partitionArray5() {
32
+ int[] nums = {1, 2, 1, 2};
33
+ assertThat(new Solution().partitionArray(nums, 2), equalTo(true));
34
35
36
37
+ void partitionArray6() {
38
+ int[] nums = {1, 1, 1, 2};
39
40
41
42
43
+ void partitionArray7() {
44
+ int[] nums = {7};
45
+ assertThat(new Solution().partitionArray(nums, 1), equalTo(true));
46
47
48
49
+ void partitionArray8() {
50
+ int[] nums = {5, 5, 5, 5, 5, 5};
51
+ assertThat(new Solution().partitionArray(nums, 3), equalTo(false));
52
53
0 commit comments